Exemplo n.º 1
0
        public void Remove(Expression <Func <Post, bool> > predicate)
        {
            var post = Get(predicate);

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

            _dbContext.Entry(item).State = EntityState.Deleted;
            _dbContext.SaveChanges();
        }