Exemplo n.º 1
0
        public ActionResult Create(Make make)
        {
            if (ModelState.IsValid)
            {
                db.Makes.Add(make);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(make);
        }
Exemplo n.º 2
0
 public ActionResult Edit(Make make)
 {
     if (ModelState.IsValid)
     {
         db.Entry(make).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(make);
 }