public static void Execute <T>(this IDataContext dataContext, string expression, Action <DynamicData> fillArg, QueryLevel level) where T : class, IAggregateRoot
 {
     dataContext.OpenLock(level);
     DataPortal.Execute <T>(expression, fillArg, level);
 }
 /// <summary>
 /// 由数据上下文托管的统计方法
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="dataContext"></param>
 /// <param name="expression"></param>
 /// <param name="fillArg"></param>
 /// <param name="level"></param>
 /// <returns></returns>
 public static int GetCount <T>(this IDataContext dataContext, string expression, Action <DynamicData> fillArg, QueryLevel level) where T : class, IAggregateRoot
 {
     dataContext.OpenLock(level);
     return(DataPortal.GetCount <T>(expression, fillArg, level));
 }
Beispiel #3
0
 protected override void PersistDeleteRoot(TRoot obj)
 {
     DataPortal.Delete(obj as DomainObject);
 }
Beispiel #4
0
 protected override TRoot PersistFind(object id, QueryLevel level)
 {
     return(DataPortal.QuerySingle <TRoot>(id, level));
 }
Beispiel #5
0
 protected override void PersistAddRoot(TRoot obj)
 {
     DataPortal.Create(obj as DomainObject);
 }