Last post May 17, 2012 08:58 AM by horseparking
May 16, 2012 07:39 AM|horseparking|LINK
The facility of ASP.NET MVC 3 with Razor, Entity Framework 4, and scaffolding is quite effective for single table CRUD operations.
However, when we take master/detail into consideration, it seems that MVC Controllers cannot map effectively from Html form collections into master/detail or graph of objects.
May 16, 2012 11:49 AM|DarrellNorton|LINK
There are approaches that are being used fairly often. See these two (which are basically the same approach to Master Detail Views):
May 17, 2012 08:58 AM|horseparking|LINK
We follow database-first "workflow" (according to Julia Lerman), generate an Entity Data Model from the predefined database, use T4 template to render the POCO classes (as the domain model), and base views directly on the POCOs (domain model). The MVC scaffolding
works quite effectively in terms of single table CRUD. Few or none javascrit/jQuery work is needed.
The UpdateModel method of the MVC controller seems not designed for the master/detail settings.
We are expecting some official solution or framework so that we can write as few code as possibile. It would be great if we have a master/detail scaffolding feature. (No man-made code is the best solution)