Example #1
0
 public async Task UpdateAndSaveAsync(T entity)
 {
     _projetoModeloContext.Set <T>().Add(entity);
     await _projetoModeloContext.SaveChangesAsync();
 }
Example #2
0
        public async Task InsertAsync(TEntity obj)
        {
            await _dbContext.Set <TEntity>().AddAsync(obj);

            await _dbContext.SaveChangesAsync();
        }
 public async Task CommitAsync()
 {
     await _projetoModeloContext.SaveChangesAsync();
 }
Example #4
0
 public async Task <bool> Add(T entity)
 {
     _context.Set <T>().Add(entity);
     return(await _context.SaveChangesAsync() >= 0 ? true : false);
 }