示例#1
0
        public async Task <T> CreateAsync(T entity)
        {
            Context.Table.Add(entity);
            await Context.SaveChangesAsync();

            return(entity);
        }
示例#2
0
 public virtual async Task SaveAsync()
 {
     await Context.SaveChangesAsync();
 }