mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
add ToTreeList tests #268
This commit is contained in:
@ -43,7 +43,7 @@ namespace FreeSql
|
||||
if (_optionsPriv == null)
|
||||
{
|
||||
_optionsPriv = new DbContextOptions();
|
||||
if (FreeSqlDbContextExtensions._dicSetDbContextOptions.TryGetValue(Orm, out var opt))
|
||||
if (FreeSqlDbContextExtensions._dicSetDbContextOptions.TryGetValue(Orm.Ado.Identifier, out var opt))
|
||||
{
|
||||
_optionsPriv.EnableAddOrUpdateNavigateList = opt.EnableAddOrUpdateNavigateList;
|
||||
_optionsPriv.OnEntityChange = opt.OnEntityChange;
|
||||
|
@ -35,10 +35,10 @@ public static class FreeSqlDbContextExtensions
|
||||
public static IFreeSql SetDbContextOptions(this IFreeSql that, Action<DbContextOptions> options)
|
||||
{
|
||||
if (options == null) return that;
|
||||
var cfg = _dicSetDbContextOptions.GetOrAdd(that, t => new DbContextOptions());
|
||||
var cfg = _dicSetDbContextOptions.GetOrAdd(that.Ado.Identifier, t => new DbContextOptions());
|
||||
options(cfg);
|
||||
_dicSetDbContextOptions.AddOrUpdate(that, cfg, (t, o) => cfg);
|
||||
_dicSetDbContextOptions.AddOrUpdate(that.Ado.Identifier, cfg, (t, o) => cfg);
|
||||
return that;
|
||||
}
|
||||
internal static ConcurrentDictionary<IFreeSql, DbContextOptions> _dicSetDbContextOptions = new ConcurrentDictionary<IFreeSql, DbContextOptions>();
|
||||
internal static ConcurrentDictionary<Guid, DbContextOptions> _dicSetDbContextOptions = new ConcurrentDictionary<Guid, DbContextOptions>();
|
||||
}
|
@ -121,13 +121,6 @@
|
||||
清空状态数据
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:FreeSql.DbSet`1.RemoveAsync(System.Linq.Expressions.Expression{System.Func{`0,System.Boolean}})">
|
||||
<summary>
|
||||
根据 lambda 条件删除数据
|
||||
</summary>
|
||||
<param name="predicate"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.DbSet`1.Add(`0)">
|
||||
<summary>
|
||||
添加
|
||||
@ -222,15 +215,6 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:FreeSql.FreeSqlRepositoryDependencyInjection.AddFreeRepository(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{FreeSql.FluentDataFilter},System.Reflection.Assembly[])">
|
||||
<summary>
|
||||
批量注入 Repository,可以参考代码自行调整
|
||||
</summary>
|
||||
<param name="services"></param>
|
||||
<param name="globalDataFilter"></param>
|
||||
<param name="assemblies"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:FreeSql.IBaseRepository.Orm">
|
||||
<summary>
|
||||
注意:IFreeSql 属于顶级对象,事务无法自动传递。<para></para>
|
||||
|
Reference in New Issue
Block a user