public ActionResult Add(Book book) { using (var db = new BookStoreContext("BookStoreConnectionString")) { db.Books.Add(book); db.SaveChanges(); } return View(book); }
public ActionResult Add() { Book book = new Book(); return View(book); }