public ActionResult DeleteConfirmed(string id) { e_avtor_na e_avtor_na = db.E_Avtor_Na.Find(id); db.E_Avtor_Na.Remove(e_avtor_na); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "isbn,embg_avtor")] e_avtor_na e_avtor_na) { if (ModelState.IsValid) { db.Entry(e_avtor_na).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(e_avtor_na)); }
public ActionResult Create([Bind(Include = "isbn,embg_avtor")] e_avtor_na e_avtor_na) { if (ModelState.IsValid) { db.E_Avtor_Na.Add(e_avtor_na); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(e_avtor_na)); }
// GET: E_avtor_na/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } e_avtor_na e_avtor_na = db.E_Avtor_Na.Find(id); if (e_avtor_na == null) { return(HttpNotFound()); } return(View(e_avtor_na)); }