public async Task <OperationResult <TEntity> > CreateAsync(TEntity entity) { var entityEntry = await context.DbSet <TEntity>() .AddAsync(entity); var result = await context.CommitAsync(); return(DatabaseResult(result, entityEntry.Entity)); }
/// <summary> /// Async commit to the context /// </summary> /// <returns></returns> public async Task <int> CommitAsync() { return(await _ctx.CommitAsync()); }