public async Task <IEnumerable <T> > GetAllAsync() { return(await _providersContext.Set <T>().ToListAsync()); }
public Repository(ProvidersContext providersContext) { _providersContext = providersContext ?? throw new ArgumentNullException(nameof(providersContext)); _dbSet = _providersContext.Set <T>(); }
public async Task AddAsync(T entity) { await _providerContext.Set <T>().AddAsync(entity); }