public IQueryable <T> getAll(string[] includes = null) { if (includes != null && includes.Count() > 0) { try { var query = dataContext.Set <T>().Include(includes.First()); foreach (var i in includes.Skip(1)) { query = query.Include(i); } return(query.AsQueryable()); } catch (Exception ex) { } } return(dataContext.Set <T>().AsQueryable()); }
public IList <T> GetAll() { return(_context.Set <T>().ToList()); }