示例#1
0
        public async Task DeleteCategory(int id)
        {
            var book = _dbContext.Categories.Find(id);

            _dbContext.Remove(book);
            await _dbContext.SaveChangesAsync();
        }
示例#2
0
        public async Task Delete(int bookId)
        {
            var book = _dbContext.Books.Find(bookId);

            _dbContext.Remove(book);
            await _dbContext.SaveChangesAsync();
        }