Exemple #1
0
        public IQueryable <T> GetAllWithIncludes(params Expression <Func <T, object> >[] includes)
        {
            IQueryable <T> query = context.Set <T>().Include(includes[0]);

            foreach (var include in includes.Skip(1))
            {
                query = query.Include(include);
            }
            return(query);
        }