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