Ejemplo n.º 1
0
        public ActionResult Create(MuscleGroup musclegroup)
        {
            if (ModelState.IsValid)
            {
                db.MuscleGroups.Add(musclegroup);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

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