mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 18:47:55 +08:00
增加撤销与启动,详见:#I3ILBG
调整工程结构,采用模块化机制
This commit is contained in:
44
OpenAuth.App/AppManager/AppManager.cs
Normal file
44
OpenAuth.App/AppManager/AppManager.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using OpenAuth.App.Interface;
|
||||
using OpenAuth.App.Request;
|
||||
using OpenAuth.Repository;
|
||||
using OpenAuth.Repository.Domain;
|
||||
using OpenAuth.Repository.Interface;
|
||||
|
||||
namespace OpenAuth.App
|
||||
{
|
||||
/// <summary>
|
||||
/// 分类管理
|
||||
/// </summary>
|
||||
public class AppManager : BaseStringApp<Application,OpenAuthDBContext>
|
||||
{
|
||||
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(Application);
|
||||
}
|
||||
|
||||
|
||||
public async Task<List<Application>> GetList(QueryAppListReq request)
|
||||
{
|
||||
var applications = UnitWork.Find<Application>(null) ;
|
||||
|
||||
return applications.ToList();
|
||||
}
|
||||
|
||||
public AppManager(IUnitWork<OpenAuthDBContext> unitWork, IRepository<Application,OpenAuthDBContext> repository,IAuth auth) : base(unitWork, repository, auth)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user