public async Task <T> AddAsync(T entity) { _dbContext.Set <T>().Add(entity); await _dbContext.SaveChangesAsync(); return(entity); }
public async Task <IEnumerable <TEntity> > GetAll() { return(await _db.Set <TEntity>().ToListAsync()); }
public async Task <T> AddAsync(T entity) { _dbContext.Set <T>().Add(entity); await _dbContext.SaveChangesAsync(); return(entity); }
public async Task <IEnumerable <TEntity> > GetAll() { return(await _db.Set <TEntity>().ToListAsync()); }