public async Task <Guid> AddAsync(TEntity entity) { var entry = await _todoAppDbContext.AddAsync(entity).ConfigureAwait(false); await _todoAppDbContext.SaveChangesAsync().ConfigureAwait(false); return((Guid)entry.Property("Id").CurrentValue); }
public async Task Add(SubCategory entity) { await _context.AddAsync(entity); await _context.SaveChangesAsync(); }
public async Task Add(TodoItem todoItem) { await _dbContext.AddAsync(todoItem); await SaveChanges(); }