Exemplo n.º 1
0
 //constructor taking the database context and getting the appropriately typed data set from it
 public Repository(admin_softbbmEntities context)
 {
     dbContext = context;
     dbSet     = context.Set <T>();
 }
Exemplo n.º 2
0
        public virtual IQueryable <T> GetAll()
        {
            IQueryable <T> query = dbContext.Set <T>();

            return(query);
        }
Exemplo n.º 3
0
        public virtual async Task <List <T> > GetAll <T>() where T : class
        {
            var query = await DbContext.Set <T>().ToListAsync <T>();

            return(query);
        }