示例#1
0
        public async Task <IEnumerable <T> > GetAll()
        {
            var result = await _context.Set <T>().ToListAsync();

            return(result);
        }
示例#2
0
 protected Repository(CoffeeShopContext db)
 {
     Db    = db;
     DbSet = db.Set <TEntity>();
 }
示例#3
0
 public Repository(CoffeeShopContext context)
 {
     Context     = context;
     DbSetEntity = Context.Set <TEntity>();
 }