Exemple #1
0
 /// <summary>
 /// 获取所有实体类的UnitOfWork
 /// </summary>
 public static IUnitOfWork[] GetEntityUnitOfWorks(this ScopedDictionary dict)
 {
     return(dict.Where(m => m.Key.StartsWith("UnitOfWork_EntityType_")).Select(m => m.Value as IUnitOfWork).ToArray());
 }
Exemple #2
0
 /// <summary>
 /// 获取所有连接串的UnitOfWork
 /// </summary>
 public static IUnitOfWork[] GetConnUnitOfWorks(this ScopedDictionary dict)
 {
     return(dict.Where(m => m.Key.StartsWith("UnitOfWork_ConnString_")).Select(m => m.Value as IUnitOfWork).ToArray());
 }