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

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

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