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