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