public void Remove(Expression <Func <Post, bool> > predicate) { var post = Get(predicate); _dbContext.Entry(post).State = EntityState.Deleted; _dbContext.SaveChanges(); }
public void Remove(Expression <Func <T, bool> > predicate) { var item = GetAsync(predicate); _dbContext.Entry(item).State = EntityState.Deleted; _dbContext.SaveChanges(); }