add ToTreeList tests #268

This commit is contained in:
28810
2020-04-10 13:09:08 +08:00
parent f9566af7d1
commit 4e4240ff7a
24 changed files with 1291 additions and 283 deletions

View File

@ -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>();
}