Jul 19, 2019 01:13 AM|bruce (sqlwork.com)|LINK
you have several error in your original post.
1) the view is expecting a Patient object instance,
but you are passing a List<Patient>, so the model is typecast error.
2. you foreach a string, so item is char (each char of the string)
@foreach (var item in Model.PatientFirstName)
most lastly you wanted to define the Model as
and foreach the Model, so item is patient.
@foreach (var item in Model)