public async Task <TEntity> AddAsync(TEntity entity) { if (entity == null) { throw new ArgumentException("AddAsync parameter must not be null."); } try { await _context.AddAsync(entity); var a = await _context.SaveChangesAsync(); return(entity); } catch (Exception ex) { throw ex; } }
public Task SaveChangesAsync() { return(_dbContext.SaveChangesAsync()); }