views:

279

answers:

2

Does anyone know of any tools for generating ASP.NET MVC CRUD User Interfaces (E.g. the controllers and views for Admin tools), given:

  • A set of model objects.
  • A set of repositories for retrieving those objects.

Thanks

+1  A: 

There is a project on codeplex called MVCCrud this will automate repository and controller. Also optionally supports JqGrid (searching, sorting etc). It isnt included in the project but its very simple to add some T4 templates to generate the desired view.

If you just want normal crud functionality this is very very quick. Only downside is the only repository is Linq2Sql, but you can easily add your own using their interface it is prity simple to extend or use parts of.

Matthew Hood
Is it possible to use MVCCrud without jqGrid? (there doesn't appear to be any documentation on the codeplex pages)
UpTheCreek
For MVCCrud you only need the normal JqGrid client side javascript (included in the example if you dont want to look around). You dont need the Commercial JqGrid MVC stuff. Else MvcCrud does with without jqgrid but its a nice addition
Matthew Hood
To clarify you only need the client side stuff which you can get from http://www.trirand.com/blog/?page_id=6
Matthew Hood
Thanks, I missunderstood the licensing terms.
UpTheCreek
+1  A: 

The Crud Template which are shipped with ASP.NET MVC are based on T4 which is a code generation tool which ships with Visual Studio. This means you can take the templates and customize them based on your taste and make your own... take a look at Scott Hanselman's ninja tips and tricks video's he goes into details here:

http://channel9.msdn.com/posts/matthijs/ASPNET-MVC-2-Ninja-Black-Belt-Tips-by-Scott-Hanselman/

silverfighter