예제 #1
0
        // Deletes a book by ID
        public void DeleteBook(int bookId)
        {
            s_logger.Info($"Deleting book with ID {bookId}");
            Book entity = _dbContext.Books.Find(bookId);

            _dbContext.Remove(entity);
        }
예제 #2
0
        public void DeleteCustomer(int customerId)
        {
            s_logger.Info($"Deleting customer with ID {customerId}");
            Customer entity = _dbContext.Customers.Find(customerId);

            _dbContext.Remove(entity);
        }