Ejemplo n.º 1
0
        public IActionResult CreateNurse(Nurse nurse)
        {
            if (ModelState.IsValid)
            {
                var newNurse = new Nurse
                {
                    LastName  = nurse.LastName,
                    FirstName = nurse.FirstName
                };

                _nurseService.Add(newNurse);

                return(RedirectToAction(nameof(ListNurse)));
            }
            else
            {
                return(View());
            }
        }