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

            return View(type);
        }