Example #1
0
        public async Task <IEnumerable <TEntity> > GetAll(string[] includetbl = null)
        {
            IQueryable <TEntity> query = _context.Set <TEntity>();

            if (includetbl != null)
            {
                foreach (var item in includetbl)
                {
                    query = query.Include(item);
                }
            }

            return(await query.ToListAsync());
        }
Example #2
0
 public List <TEntity> GetAll()
 {
     return(_context.Set <TEntity>().ToList());
 }