public ActionResult Create([Bind(Include = "id,publish_name,company_name,address,postal_code,country")] Publisher publisher) { if (ModelState.IsValid) { db.Publishers.Add(publisher); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(publisher)); }
public ActionResult Create([Bind(Include = "id,name,email,address")] Author author) { if (ModelState.IsValid) { db.Authors.Add(author); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(author)); }
public ActionResult Create([Bind(Include = "id,name")] Category category) { if (ModelState.IsValid) { db.Categories.Add(category); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(category)); }