Ejemplo n.º 1
0
        public ActionResult Create(Step step)
        {
            var stepToCreate = new Step();
            TransferValues(step, stepToCreate);

            stepToCreate.TransferValidationMessagesTo(ModelState);

            if (ModelState.IsValid)
            {
                _stepRepository.EnsurePersistent(stepToCreate);

                Message = "Step Created Successfully";

                return RedirectToAction("Index");
            }
            else
            {
                return View(step);
            }
        }