I have a few cases where the viewmodel and a view has the same name (in different namespaces) like this:
MyProject.Models.ThankYou <- viewmodel
MyProject.Views.Signup.ThankYou <- razor view
The razor template has the usual "@model ThankYou" in the beginning, and this resolves to MyProject.Models.ThankYou but the generated.cs is
public class ThankYou: MyWebRole.Helpers.WebViewPage<ThankYou>
which means that the <ThankYou> refers to itself, not the viewmodel.
When I specify the full namespace and class it compiles wonderfully.
The quick fix I guess would be to specify the full namespace and class as Razor would interpret it, instead of just class in the generator?
Comments: Feel free to open if you think this still needs addressing. But there are workarounds for this that would work.
MyProject.Models.ThankYou <- viewmodel
MyProject.Views.Signup.ThankYou <- razor view
The razor template has the usual "@model ThankYou" in the beginning, and this resolves to MyProject.Models.ThankYou but the generated.cs is
public class ThankYou: MyWebRole.Helpers.WebViewPage<ThankYou>
which means that the <ThankYou> refers to itself, not the viewmodel.
When I specify the full namespace and class it compiles wonderfully.
The quick fix I guess would be to specify the full namespace and class as Razor would interpret it, instead of just class in the generator?
Comments: Feel free to open if you think this still needs addressing. But there are workarounds for this that would work.