public BaseRepository(EcommerceContext context) { context = context; dbSet = context.Set <TEntity>(); }
public Responsitory(EcommerceContext _context) { _dbContext = _context; _dbSet = _context.Set <T>(); }
public BaseRepository(EcommerceContext ecommerceContext, INotifiable notifications) { Db = ecommerceContext; DbSet = Db.Set <TEntity>(); _notifications = notifications; }
public IEnumerable <TEntity> GetAll() { return(db.Set <TEntity>().ToList()); }
public GenericRepository(EcommerceContext context) { Context = context; DbSet = context.Set <TEntity>(); }
public Repository(EcommerceContext context) { _context = context; _entity = context.Set <TEntity>(); }
public void Add(TEntity obj) { db.Set <TEntity>().Add(obj); db.SaveChanges(); }
protected BaseRepository(EcommerceContext context) { _dbSet = context.Set <TModel>(); }