public ActionResult EditMarket(Market type) { if (ModelState.IsValid) { db.Entry(type).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Markets"); } return View(type); }
public ActionResult CreateMarket(Market type) { if (ModelState.IsValid) { db.Markets.Add(type); db.SaveChanges(); return RedirectToAction("Markets"); } return View(type); }