예제 #1
0
        private IQueryable <T> Include(IList <String> includes)
        {
            IQueryable <T> query = _context.Set <T>();

            if (includes == null)
            {
                return(query);
            }

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

            return(query);
        }
예제 #2
0
 public GenericRepository(ScientificOlympDBContext context)
 {
     _context = context;
     table    = _context.Set <T>();
 }