예제 #1
0
 public IActionResult CreatePatient(EditedPatient patient)
 {
     if (ModelState.IsValid)
     {
         var client = new ResourceGetter();
         client.AddItem(patient.MapToResource());
         return(RedirectToAction("InfoIndex", "Home", new { infoMessage = $"Dodano rekord {patient.GivenName} {patient.FamilyName}." }));
     }
     else
     {
         return(View(patient));
     }
 }