public async Task DeleteCategory(int id) { var book = _dbContext.Categories.Find(id); _dbContext.Remove(book); await _dbContext.SaveChangesAsync(); }
public async Task Delete(int bookId) { var book = _dbContext.Books.Find(bookId); _dbContext.Remove(book); await _dbContext.SaveChangesAsync(); }