I am trying to learn MVC. I want to automatically generate the required view code as and when I add a controller. This is possible if I select the option “Controller with read/write actions and views, using Entity Framework” . However I am not using Entity Framework. How can I achieve the similar behavior without using Entity Framework? And why it is unable to automatically generate the view when I don’t use Entity Framework?
Also, is there any good MVC3 tutorial that does not use Entity Framework (with code download available) ?
Reference
How do I configure ASP.net MVC to Scaffold using ADO.net dataservice?
Levergaing T4Scaffolding for WCF Web API
Scaffold your ASP.NET MVC 3 project with the MvcScaffolding package
Once again LINQ to SQL or Entity Framework for new MVC 3 project
MVC Scaffolding for WCF Services
You might find some of what you're looking for in Steve Sanderson's MvcScaffolding package
Nuget
After installing (it will probably install some EF requirements) you could scaffold basic CRUD views for your model as follows assuming a model type
MySweetModel
Please note this command will not create the controller class, but should create the following views under
/Views/MySweetModel
It looks like you might be able to override the default T4 templates, but I've never used MvcScaffolding outside the scope of EF. It's also possible someone has already done this for your persistence layer e.g. NHibernate or whatever you're using. I'd search a bit before implementing your own templates.