Yeah, got bitten by that a few times my self. In s...
# show-and-tell
s
Yeah, got bitten by that a few times my self. In stead of naming the view model SomethingSomething*ViewModel*, I typically create it in another namespace, so the model is eg.
Copy code
using ContentModels = MyProject.Models.ContentModels;
namespace MyProject.Models.ViewModels;
public class MyOrder : ContentModels.MyOrder
{
And then in my view I have
Copy code
@inherits UmbracoViewPage<ViewModels.MyOrder>
instead of ContentModels.MyOrder. I think it communicates efficiently that this view is relying on a custom view model, without having the long class name
2 Views