Beispiel #1
0
        public ActionResult Create(Size size)
        {
            if (ModelState.IsValid)
            {
                db.Sizes.Add(size);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(size);
        }
Beispiel #2
0
 public ActionResult Edit(Size size)
 {
     if (ModelState.IsValid)
     {
         db.Entry(size).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(size);
 }