public TEntity Get(int id) { // Here we are working with a DbContext, not PlutoContext. So we don't have DbSets // such as Courses or Authors, and we need to use the generic Set() method to access them. return(Context.Set <TEntity>().Find(id)); }
public GenericRepository(StoreDBContext _dbContext) { dbContext = _dbContext; dbSet = dbContext.Set <T>(); }
public StoreBaseRepository() { //Get the specific set of the Required Table dbSet = context.Set <T>(); }