I have an EditorFor HTML helper in my MVC3 Razor view as follows:
@Html.EditorFor(x => x.RouteOfReferral,
MVC.Shared.Views.EditorTemplates.TabValidationMessage,
new {
ValidationPropertyName = ogt.PropertyName(
x => x.RouteOfReferral)
}
)
On the entity, I changed the type of the property from one reference data type to another, updated the viewmodel to reflect this, ran all my tests and all passed.
However, when I went to the page through the UI, I got this exception:
System.MissingMethodException
Method not found:'MyProject.Entities.ReferenceData.Entity.RouteOfReferral
MyProject.Entities.ReferenceData.Entity.get_RouteOfReferral()'.
The strange thing is that, I commented out the HTML helper, refreshed the page, and it opened as usual. I then uncommented the HTML helper and the page opened as usual again and was fine from then on.
The problem is, now that I have deployed to the integration test platform, the same problem has occurred.
Any ideas?