同步OpenAuth.Core,增加多数据源

This commit is contained in:
ÂëÉñ
2020-12-29 23:52:06 +08:00
committed by yubaolee
parent 20a717b2e6
commit 304a0eb54d
40 changed files with 119 additions and 83 deletions

View File

@@ -19,6 +19,7 @@ using System.Collections.Generic;
using System.Linq;
using Infrastructure;
using OpenAuth.App.Response;
using OpenAuth.Repository;
using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface;
@@ -27,7 +28,7 @@ namespace OpenAuth.App
/// <summary>
/// 普通用户授权策略
/// </summary>
public class NormalAuthStrategy :BaseApp<User>, IAuthStrategy
public class NormalAuthStrategy :BaseApp<User,OpenAuthDBContext>, IAuthStrategy
{
protected User _user;
@@ -134,7 +135,7 @@ namespace OpenAuth.App
//用户角色
public NormalAuthStrategy(IUnitWork unitWork, IRepository<User> repository, DbExtension dbExtension) : base(unitWork, repository,null)
public NormalAuthStrategy(IUnitWork<OpenAuthDBContext> unitWork, IRepository<User,OpenAuthDBContext> repository, DbExtension dbExtension) : base(unitWork, repository,null)
{
_dbExtension = dbExtension;
}

View File

@@ -19,6 +19,7 @@ using System.Collections.Generic;
using System.Linq;
using Infrastructure;
using OpenAuth.App.Response;
using OpenAuth.Repository;
using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface;
@@ -29,7 +30,7 @@ namespace OpenAuth.App
/// <para>超级管理员权限</para>
/// <para>超级管理员使用guid.empty为ID可以根据需要修改</para>
/// </summary>
public class SystemAuthStrategy : BaseApp<User>, IAuthStrategy
public class SystemAuthStrategy : BaseApp<User,OpenAuthDBContext>, IAuthStrategy
{
protected User _user;
private DbExtension _dbExtension;
@@ -97,7 +98,7 @@ namespace OpenAuth.App
}
public SystemAuthStrategy(IUnitWork unitWork, IRepository<User> repository, DbExtension dbExtension) : base(unitWork, repository, null)
public SystemAuthStrategy(IUnitWork<OpenAuthDBContext> unitWork, IRepository<User,OpenAuthDBContext> repository, DbExtension dbExtension) : base(unitWork, repository, null)
{
_dbExtension = dbExtension;
_user = new User