public void AddOnlineBook(CustomerOnlineBook customerOnlineBook)
 {
     if (isOnlineBookExistsInCustomerList(customerOnlineBook) == true)
     {
         Console.WriteLine("Online book is already exists in customer list");
     }
     else
     {
         using (var newDal = new DBdal())
         {
             newDal.customerOnlineBooks.Add(customerOnlineBook);
             newDal.SaveChanges();
         }
     }
 }
예제 #2
0
 public void addCustomer(Customer customer)
 {
     dal.customers.Add(customer);
     dal.SaveChanges();
 }