public GenericRepository(CarDbContext mainDbContext) { _context = mainDbContext; _dbSet = _context.Set <TEntity>(); }
public void Add(T entity) { _db.Set <T>().Add(entity); }
public RepositoryBase(CarDbContext context) { _db = context; _table = _db.Set <T>(); }
public GenericRepository(CarDbContext context) { this.context = context; this.dbSet = context.Set <TEntity>(); }
// GET: Series/Create public IActionResult Create() { ViewData["BrandID"] = new SelectList(_context.Set <Brand>(), "ID", "ID"); return(View()); }