public async Task RemoveAsync(TEntity entity)
 {
     _context.Remove(entity);
     await _context.SaveChangesAsync();
 }
Example #2
0
 public async Task RemoveSync(TEntity entity)
 {
     using var context = new MyBlogContext();
     context.Remove(entity);
     await context.SaveChangesAsync();
 }