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

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

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