mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-03 15:46:37 +08:00
重构user控制器
This commit is contained in:
@@ -14,13 +14,13 @@ namespace Yi.Framework.Service
|
||||
public class BaseService<T> : IBaseService<T> where T : class, new()
|
||||
{
|
||||
public DbContext _Db;
|
||||
public DbContext _Db2;
|
||||
public DbContext _DbRead;
|
||||
public IDbContextFactory _DbFactory;
|
||||
public BaseService(IDbContextFactory DbFactory)
|
||||
{
|
||||
_DbFactory = DbFactory;
|
||||
_Db = DbFactory.ConnWriteOrRead(WriteAndReadEnum.Write);
|
||||
_Db2 = DbFactory.ConnWriteOrRead(WriteAndReadEnum.Read);
|
||||
_DbRead = DbFactory.ConnWriteOrRead(WriteAndReadEnum.Read);
|
||||
}
|
||||
|
||||
public async Task<T> GetEntityById(int id)
|
||||
|
||||
Reference in New Issue
Block a user