Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 03, 2012 02:04 PM by 3v3rhart
Feb 02, 2012 12:38 AM|LINK
dilemma: Within Visual Web Developer Express, Should I...
1. Allow Entity Framework to create model and CRUD scaffolding for a project.
2. connect to existing SQL database without the benefit of Entity creating the model.
Is there an advantage to allowing the columns / fields to be created through Entity Framework?
If I create model through Entity, I will have to reenter field details for about 100 columns / fields (e.g. distinguishing field type detail such as int / tinyint / small int / bigint/ varchar(max 50 / varchar)).
Feb 02, 2012 09:28 AM|LINK
There are three approaches for using EF:
If you have an existing database, choose the database first approach. When you say scaffolding, I think you just mean the ability to CRUD various entities. There are also ASP.NET MVC Scaffolding Templates that create the MVC pages for CRUD as well, combined
with Entity Framework you could create a CRUD application very quickly. For a tutorial, see this article: http://msdn.microsoft.com/en-us/data/gg685489
If you want to write code and just code, and then let EF figure out how to save your classes to the database, use the code-first approach.
And if you do not have a database and want to use a designer for the modeling experience because you are a visual person (and not code-first), use the model first approach.
Feb 03, 2012 02:04 PM|LINK
Thank you Darrell.
Looks like i'll be following the database first tutorial you suggested.