public ActionResult Create(Damage damages) { if (ModelState.IsValid) { db.Damages.Add(damages); db.SaveChanges(); return RedirectToAction("Index"); } return View(damages); }
public ActionResult Edit(Damage damages) { if (ModelState.IsValid) { db.Entry(damages).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(damages); }