mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-14 13:36:39 +08:00
feat: 完成多db功能搭建
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using System.Reflection;
|
||||
using SqlSugar;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
|
||||
namespace Yi.Framework.SqlSugarCore;
|
||||
|
||||
public abstract class SqlSugarDbContext : ISqlSugarDbContextDependencies
|
||||
{
|
||||
//属性注入
|
||||
public IAbpLazyServiceProvider LazyServiceProvider { get; set; }
|
||||
protected ISqlSugarClient SqlSugarClient { get;private set; }
|
||||
public void OnSqlSugarClientConfig(ISqlSugarClient sqlSugarClient)
|
||||
{
|
||||
SqlSugarClient = sqlSugarClient;
|
||||
CustomDataFilter(sqlSugarClient);
|
||||
}
|
||||
protected virtual void CustomDataFilter(ISqlSugarClient sqlSugarClient)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void DataExecuted(object oldValue, DataAfterModel entityInfo)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void DataExecuting(object oldValue, DataFilterModel entityInfo)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnLogExecuting(string sql, SugarParameter[] pars)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnLogExecuted(string sql, SugarParameter[] pars)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void EntityService(PropertyInfo propertyInfo, EntityColumnInfo entityColumnInfo)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user