public BaseRepository(PaymentDBContext dbContext, ILogger <BaseRepository <T> > logger) { if (dbContext == null) { throw new ArgumentNullException("context is empty"); } _dbContext = dbContext; _logger = logger; this.dbSet = _dbContext.Set <T>(); }
public GenericRepository(PaymentDBContext Context) { this._paymentDBContext = Context; this._dbSet = _paymentDBContext.Set <TEntity>(); }
public async Task <IEnumerable <TEntity> > GetAllAsync() { return(await _context.Set <TEntity>().ToListAsync()); }