Ejemplo n.º 1
0
 public static void WithDataManager(this IDataManagerFactrory factory, Action <IDataManager> func, Boolean transaction = false)
 {
     factory.WithDataManager(manager =>
     {
         func(manager);
         return(true);
     }, transaction);
 }
Ejemplo n.º 2
0
 public static TRes WithRepository <TRes, TRepo>(this IDataManagerFactrory factory, Func <TRepo, TRes> func, Boolean transaction = false) where TRepo : IRepository
 {
     return(factory.WithDataManager(manager => func(manager.GetRepository <TRepo>()), transaction));
 }