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

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