- 修复 WithMemory 对 InsertValueSql 属性无效的问题;

This commit is contained in:
2881099
2024-02-06 03:56:47 +08:00
parent 49c89961c3
commit 91362ad07a
5 changed files with 118 additions and 103 deletions

View File

@ -119,11 +119,12 @@ namespace FreeSql
public ISelect<TEntity> WhereIf(bool condition, Expression<Func<TEntity, bool>> exp) => Select.WhereIf(condition, exp);
readonly Dictionary<Type, IBaseRepository<object>> _childRepositorys = new Dictionary<Type, IBaseRepository<object>>();
protected virtual IFreeSql GetChildFreeSql(Type type) => Orm;
IBaseRepository<object> GetChildRepository(Type type)
{
if (_childRepositorys.TryGetValue(type, out var repo) == false)
{
repo = Orm.GetRepository<object>();
repo = GetChildFreeSql(type).GetRepository<object>();
repo.AsType(type);
_childRepositorys.Add(type, repo);
}