예제 #1
0
        public virtual async Task <int> DeleteAsync(Expression <Func <TEntity, bool> > filter)
        {
            var res = await this.FindAsync(filter);

            dbSet.Attach(res);
            dbSet.Remove(res);
            return(await context.SaveChangesAsync());
        }
예제 #2
0
 public async Task <int> SaveAsync()
 {
     return(await context.SaveChangesAsync());
 }