Sample ASP.Net MVC project (updated)


I’ve updated the sample MVC project I wrote for using ASP.NET MVC 3 and the Razor view engine.

A minor change is that I no longer use the FluentValidationModelValidatorProvider but the standard one. So I decorate the view model with the necessary data annotations :

And the validator becomes :

And here are the corresponding views using Razor :

Index.cshtml

_TableLinks.cshtml

Edit.cshtml

New.cshtml

Show.cshtml

UserViewModel.cshtml editor template

UserViewModel.cshtml display template

 

Leave a comment

Your email address will not be published. Required fields are marked *