first of all, my background: a rather large database (~ 100 tables with ~ 10-20 columns each) on MS SQL Server, and it will always be SQL Server and the database.
I have some experience with WebForms and LINQ to SQL, but Iโm tired of creating forms for editing all the tables mentioned, so the mvc 3 razor is with it. Forests just mesmerized me, and I dream about it, generating all this forms for me
but it comes out (or maybe I'm not getting something) that scaffolding only works for EF DbContext. for L2S, it says "unsupported DbContext". I tried MvcScaffolding with LinqToSqlScaffolding (typed "Set-DefaultScaffolder Repository LinqToSqlScaffolding.Repository" in the PM console) but still did not sing L2S โโmapping.
So, the first question: "Is there a way (stable way) to get forests for Linq to SQL classes"
Now Iโve researched some and found all these topics about L2S vs EF, saying the same thing: โL2S came first, so itโs more stable, and EF is still young, but itโs a long shot, itโs flexible, displayed, etc.โ
The first thing I donโt understand is how can I map this flexible model to my enterprise database? I used the constructor to create a class for EF DbContext, as I already did for L2S, and for L2S it consists of ~ 42000 lines. Now I need to find some properties of the object and set some attributes for them, such as "Required", "Show" and "Range", but the designer will overwrite them. I know how to implement a partial class or partial method, but I do not know what to make any additions to the properties in the external file, because the developer could not overwrite them. I think this should be the second question.
and if I have to compare my enterprise database with EF hands so that it is flexible ... o_O that ~ 42,000 lines of the auto-generated class scares me with bees! Is it really necessary?
linq-to-sql asp.net-mvc-3 entity-framework scaffolding
Arthur Jul 14 '11 at 12:45 2011-07-14 12:45
source share