Exemple #1
0
 public static void InsertBookBySP(BookModel newBook)
 {
     using (BookStoreEntities ef = new BookStoreEntities())
     {
         //here we use the SP that we created in the DB
         ef.InsertBook(newBook.BookName, newBook.BookPrice, newBook.AuthorID);
         ef.SaveChanges();
     }
 }