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