public void RemoveCustomer(Customer customer) { using var context = new LibraryContext(); context.Custumers.Remove(customer); context.SaveChanges(); }
public void RemoveBook(Book book) { using var context = new LibraryContext(); context.Books.Remove(book); context.SaveChanges(); }
public void UpdateCondition(Book book, byte newCondition) { using var context = new LibraryContext(); book.Condition = newCondition; context.SaveChanges(); }
public void MoveBook(Book book, int shelfID) { using var context = new LibraryContext(); book.ShelfID = shelfID; context.SaveChanges(); }