public static void WithDataManager(this IDataManagerFactrory factory, Action <IDataManager> func, Boolean transaction = false) { factory.WithDataManager(manager => { func(manager); return(true); }, transaction); }
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)); }