コード例 #1
0
        public static void LoadAllLinear <T>(this List <T> me, IDataAccessor DataAccessor, LoadAllArgs <T> args = null) where T : IDataObject, new()
        {
            var agl = DataAccessor.AggregateLoad <T>(args.NoLists());

            agl.ForEach(a => me.Add(a));
            agl.Clear();
        }
コード例 #2
0
 public static List <T> AggregateLoad <T>(this IDataAccessor self, Expression <Func <T, bool> > conditions = null, int?skip = null, int?limit = null, Expression <Func <T, object> > orderingMember = null, OrderingType ordering = OrderingType.Asc, MemberInfo GroupingMember = null, bool Linear = false)
     where T : IDataObject, new()
 {
     return(self.AggregateLoad <T>(
                Core.Interfaces.LoadAll.Where <T>(conditions)
                .Skip(skip)
                .Limit(limit)
                .OrderBy(orderingMember, ordering)
                .GroupBy(GroupingMember)
                .LinearIf(Linear)
                ));
 }