Entity Framework CRUD Scaffolding v existing SQL database http://forums.asp.net/t/1764936.aspx/1?Entity+Framework+CRUD+Scaffolding+v+existing+SQL+database+Fri, 03 Feb 2012 14:04:28 -050017649364811589http://forums.asp.net/p/1764936/4811589.aspx/1?Entity+Framework+CRUD+Scaffolding+v+existing+SQL+database+Entity Framework CRUD Scaffolding v existing SQL database <p>dilemma: Within Visual Web Developer Express, Should I...</p> <p>1. Allow Entity Framework to create model and CRUD scaffolding&nbsp;for a project.</p> <p>2. connect to existing SQL database without the benefit of Entity creating the model.</p> <p>Is there an advantage to allowing the columns / fields to be created&nbsp;through&nbsp;Entity Framework?</p> <p>If I create model through Entity, I will have to reenter field details&nbsp;for&nbsp;about 100&nbsp;columns / fields (e.g. distinguishing field type detail such as int / tinyint / small int / bigint/&nbsp;varchar(max 50 / varchar)).</p> <p>Thanks!</p> <p>Dean</p> 2012-02-02T00:38:50-05:004812342http://forums.asp.net/p/1764936/4812342.aspx/1?Re+Entity+Framework+CRUD+Scaffolding+v+existing+SQL+database+Re: Entity Framework CRUD Scaffolding v existing SQL database <p>There are three approaches for using EF:</p> <p>Code-First</p> <p>Model-First</p> <p>Database-First</p> <p>If you have an existing database, choose the database first approach. &nbsp;When you say scaffolding, I think you just mean the ability to CRUD various entities. &nbsp;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. &nbsp;For a tutorial, see this article: &nbsp;<a href="http://msdn.microsoft.com/en-us/data/gg685489">http://msdn.microsoft.com/en-us/data/gg685489</a></p> <p>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.</p> <p>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.</p> 2012-02-02T09:28:20-05:004814927http://forums.asp.net/p/1764936/4814927.aspx/1?Re+Entity+Framework+CRUD+Scaffolding+v+existing+SQL+database+Re: Entity Framework CRUD Scaffolding v existing SQL database <p>Thank you Darrell.</p> <p>Looks like i'll be following the database first tutorial you suggested.</p> <p>Thanks again.</p> <p>Dean</p> 2012-02-03T14:04:28-05:00