mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-06-26 22:33:09 +08:00
check bugs
This commit is contained in:
38
OpenAuth.App/AppManager.cs
Normal file
38
OpenAuth.App/AppManager.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenAuth.App.Request;
|
||||
using OpenAuth.App.Response;
|
||||
using OpenAuth.Repository.Domain;
|
||||
|
||||
namespace OpenAuth.App
|
||||
{
|
||||
/// <summary>
|
||||
/// 分类管理
|
||||
/// </summary>
|
||||
public class AppManager : BaseApp<Application>
|
||||
{
|
||||
public void Add(Application Application)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Application.Id))
|
||||
{
|
||||
Application.Id = Guid.NewGuid().ToString();
|
||||
}
|
||||
Repository.Add(Application);
|
||||
}
|
||||
|
||||
public void Update(Application Application)
|
||||
{
|
||||
Repository.Update(u =>u.Id,Application);
|
||||
}
|
||||
|
||||
|
||||
public List<Application> GetList(QueryAppListReq request)
|
||||
{
|
||||
var applications = UnitWork.Find<Application>(null) ;
|
||||
|
||||
return applications.ToList();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
7
OpenAuth.App/Request/QueryAppListReq.cs
Normal file
7
OpenAuth.App/Request/QueryAppListReq.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace OpenAuth.App.Request
|
||||
{
|
||||
public class QueryAppListReq : PageReq
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user