public IActionResult Add(AddSymptomViewModel addSymptomViewModel) { // Add the new symptom to my existing symptoms Symptom newSymptom = new Symptom { Name = addSymptomViewModel.Name, Date = addSymptomViewModel.Date, Location = addSymptomViewModel.Location, Severity = addSymptomViewModel.Severity, }; context.Symptoms.Add(newSymptom); context.SaveChanges(); return(Redirect("/Symptom/List")); }
public IActionResult Add() { AddSymptomViewModel addSymptomViewModel = new AddSymptomViewModel(); return(View(addSymptomViewModel)); }