Example #1
0
        public virtual async Task <TEntity> CreateAsync(TEntity entity)
        {
            if (entity != null)
            {
                await EntitySet.AddAsync(entity);

                await _context.SaveChangesAsync();
            }

            return(entity);
        }
Example #2
0
 public async Task <int> CommitAsync() => await _databaseContextCore.SaveChangesAsync();