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