I'm using 7.6.4 and I'm sure a feature I've used in earlier versions is now missing - the ability to use custom ViewModels that don't inherit from RenderModel in a view.
I'm sure this has worked previously:
ViewModel:
public class PersonViewModel
{
public string FirstName {get; set;}
public string LastName {get; set;}
}
... hijack the route with a controller then render the View:
This no longer seems to work anymore and I'm being forced to make my ViewModels inherit from RenderModel, injecting the PublishedContent object and culture just to instantiate them.
Pretty sure I created a whole site using the above method but I no longer have the code to prove it.
Am I doing something wrong or has this feature been removed?
Route Hijacking and custom ViewModels
I'm using 7.6.4 and I'm sure a feature I've used in earlier versions is now missing - the ability to use custom ViewModels that don't inherit from RenderModel in a view.
I'm sure this has worked previously:
ViewModel:
... hijack the route with a controller then render the View:
This no longer seems to work anymore and I'm being forced to make my ViewModels inherit from RenderModel, injecting the PublishedContent object and culture just to instantiate them.
Pretty sure I created a whole site using the above method but I no longer have the code to prove it.
Am I doing something wrong or has this feature been removed?
is working on a reply...