Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Classes for EF - newbie question
Message
 
 
General information
Forum:
ASP.NET
Category:
Entity Framework
Environment versions
Environment:
C# 4.0
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01628544
Message ID:
01628555
Views:
32
>>>>Hi,
>>>>
>>>>I am watching one of the Pluralsight courses on EF (by Julie Lerman). The first thing she creates is a class project with a file .classes where she writes 3 classes (Ninja, Clan, NinjaEquipment).
>>>>
>>>>Does it mean that when I prepare my application database to be used with EF I have to create a similar class library classes.cs with a class for each of the tables in my database?
>>>
>>>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.
>>
>>I will be starting my work with EF using EF 7 that not longer has Data Model. So I will have to either write the classes by hand or use some 3P tool to generate the code based on my database. This is my understanding. Am I wrong?
>
>If you're using EF7 then, yes, I believe you are right. Haven't used it - my stuff is still in EF6.

I figured if I start I might as well start with the latest version. Will see how far it will take me :). Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform