Ejemplo n.º 1
0
        public async Task Add(T entity)
        {
            // await _context.AddAsync(entity);
            await _context.Set <T>().AddAsync(entity);

            await _context.SaveChangesAsync();
        }
Ejemplo n.º 2
0
 public async Task AddAsync(TEntity entity)
 {
     EntityDbSet.Add(entity);
     await EntityContext.SaveChangesAsync();
 }