У меня есть этот кусок кода в .cshtml.
@using (Html.BeginRouteForm("CheckoutShippingAddress", FormMethod.Post))
{
<div class="enter-address-body">
@{
var dataDictPatient = new ViewDataDictionary();
dataDictPatient.ModelState.Merge(ViewData.ModelState);
dataDictPatient.TemplateInfo.HtmlFieldPrefix = "PatientInformation";
@Html.Partial("_CreateOrUpdateAddress", Model.PatientRoom, dataDictAddress)
}
то, что происходит, является ошибкой
The model item passed into the dictionary is of type 'Models.Common.PatientModel',
but this dictionary requires a model item of type 'Models.Common.AddressModel'.
что я не понимаю, так это то, что я изменил словарь, чтобы захотеть модель пациента, а не модель адреса.