public T GetById(int id) { return(_context.Set <T>().Find(id)); }
public GenericRepository(DbContext context) { _context = context; _dbSet = context.Set <T>(); }
public EFGenericRepository(DbContext context) { _context = context; _dbSet = context.Set <TEntity>(); }
public ManufacturerRepository(DbContext context) { _context = context; _entities = _context.Set <Manufacturer>(); }
public void Add(TEntity entity) { Context.Set <TEntity>().Add(entity); }
public List <Course> GetAll() { return(context.Set <Course>().Include(x => x.Teachers).ToList()); }