MvcScaffolding - does it support model one?

I played with the MvcScaffolding project - very nice BTW; however, does anyone know if it supports Model First design scenarios (e.g. EF4 Data Model → Generate from Database)?

If it really supports Model First scripts, do you know any links describing the Model First design script?

Thank...

+3
source share
6 answers

MvcScaffolding is quite flexible in terms of the scenarios it will work with. However, in order to support anything other than the standard code, which is code at first, you may need to change the output a bit. MvcScaffolding itself has no restrictions, and you first use the model, first the code, or something else. All you have to do is point it to an open class, and it will raise it.

However, the text templates supplied with MvcScaffolding are designed to generate controller code that interacts with the first type of EF 4.1 code, so there will be some tuning of the generated controller code needed to support the first scenario of the model.

MvcScaffolding, . framework 4.1, - . , , . , , , . , , .

MvcScaffolding , , . , 4.1, .

+3
+2

MVC 3 First Entity Framework 4.1

, MSDN

: "" , mvcscaffolding:

PM > Controller MyEntityClass

+2

, . .

. DbContext POCO T4

  • edmx = >
  • edmx
  • " "
  • ADO.NET DbContext Generator

.designer.cs: ObjectContext DbContext.tt.

! (, -DbContextType cmds)

+1

I came up with the steps for this for the first database script. See http://weblogs.asp.net/paullitwin/archive/2011/08/11/use-mvc-scaffolding-in-database-first-mode.aspx

0
source

All Articles