No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
MDriven Turnkey | MDriven Turnkey strives to create a seamless environment for application development. | ||
If you would like to | If you would like to use parts of the functionality and render a specific ViewModel from MDriven Framework MVC projects, you can do so. | ||
A good way to get started with | A good way to get started with this is to look into the MDriven Turnkey View called Turnkey/Views/Turnkey/GenericView.cshtml | ||
The trick is to make your MVC model of type VMClass -> @model VMClass | The trick is to make your MVC model of type VMClass -> @model VMClass. | ||
@Html.Partial(Html.RazorPartialFile()); | You can then use this construct to render the ViewModel UI: @Html.Partial(Html.RazorPartialFile()); | ||
To get the actions for the left side: @Html.DisplayLeftSection() | |||
To get broken constraints: @Html.ValidationSummary(true) | To get broken constraints: @Html.ValidationSummary(true) | ||
To create VMClass instances | To create VMClass instances, use: Eco.ViewModel.Runtime.ViewModelHelper | ||
[[Category:MVC]] | [[Category:MVC]] | ||
[[Category:MDriven Turnkey]] | [[Category:MDriven Turnkey]] |
Revision as of 08:44, 15 February 2023
MDriven Turnkey strives to create a seamless environment for application development.
If you would like to use parts of the functionality and render a specific ViewModel from MDriven Framework MVC projects, you can do so.
A good way to get started with this is to look into the MDriven Turnkey View called Turnkey/Views/Turnkey/GenericView.cshtml
The trick is to make your MVC model of type VMClass -> @model VMClass.
You can then use this construct to render the ViewModel UI: @Html.Partial(Html.RazorPartialFile());
To get the actions for the left side: @Html.DisplayLeftSection()
To get broken constraints: @Html.ValidationSummary(true)
To create VMClass instances, use: Eco.ViewModel.Runtime.ViewModelHelper