Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Classes for EF - newbie question
Message
De
06/12/2015 12:32:59
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Entity Framework
Versions des environnements
Environment:
C# 4.0
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01628544
Message ID:
01628557
Vues:
41
My comment referred to the earlier EF (6 and below) where you could create the models simply by adding tables to the designer.
The problem was that the generated models were based on a 'snapshot' of the tables structures at the time they were created.
If a table (or relation, or...., or.... ) changed then you had to update the model which, in my experience never worked very well.
It was safer to dive in to the XML files and make the changes manually.

But it is not something you need to worry about in EF7 I guess.....

>Correction: Dmitry is NOT using; he is learning :).
>
>As to the "nightmare", if all your domain classes are in one class library, why is it a problem to update the CS class library with the structure change(s)? (I am just trying to understand what future brings for me :).
>
>>Didn't know Dimtry was using EF7....
>>
>>Haven't used it but wouldn't be sorry to see the designer go - tweaking it or dealing with SQL table changes was always a bit of a nightmare...
>>
>>>Are you suggesting using the designer? It's gone in EF 7.
>>>
>>>
>>>>Depends. Sounds like she is doing 'code first' - in which case .NET will create the required tables in SQL based on the classes.
>>>>For an existing database the alternative is to simply add an Entity Data Model to the project and specify which tables you want to use - that will create the classes for you.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform