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