// GET: Course public ActionResult Index() { IQueryable <Book> books = db.Set <Book>() .OrderBy(d => d.ArDescription); return(View(books.ToList())); }
protected GenericRepository(SalesContext context, IMapper mapper) { Context = context; DbSet = Context.Set <TEntity>(); Mapper = mapper; }
public RepositoryBase(SalesContext salesContext) { SalesContext = salesContext; Entities = SalesContext.Set <TEntity>(); }
public BaseRepository(SalesContext context) { _dbContext = context; //_dbContext.Configuration.ProxyCreationEnabled = false; Dbset = context.Set <T>(); }
public virtual async Task <T> GetByIdAsync(int id) { return(await Context.Set <T>().FindAsync(id)); }
protected Repository(SalesContext context, IMapper mapper) { _context = context; DbSet = _context.Set <TEntity>(); _mapper = mapper; }
public GenericSalesRepository(SalesContext context) { _context = context; _table = _context.Set <T>(); }