Beispiel #1
0
        public async Task <T> AddAsync(T entity)
        {
            _dbContext.Set <T>().Add(entity);
            await _dbContext.SaveChangesAsync();

            return(entity);
        }
Beispiel #2
0
 public async Task <IEnumerable <TEntity> > GetAll()
 {
     return(await _db.Set <TEntity>().ToListAsync());
 }