Reputation: 11
Is Entity Framework 6 uses code first approach only ? I am a bit confused when we talk about code first approach, but i want to know if it works only with entity framework 6 or entity framework 6 uses code first approach only?
Upvotes: 1
Views: 575
Reputation: 1195
No, EF 6 does not ony support Code First. Code first can be a confusing name. It does not mean that you write code and then generate a db from that. You could in fact both target a new or an existing database using code first strategy. Code first simply imply not using the model designer (edmx) to create and maintain your db-context in your development project.
Some links to get you going:
EF 6 Database first (with asp.net mvc)
EF 6 Code first against new db (with asp.net mvc)
EF 6 Code first against existing db
Ps. Worth noting is that EF 7 (Core) will only support the Code First approach (but of course, as in EF 6, against a new or an existing db).
Upvotes: 1
Reputation: 3267
Checkout this links to find the Different approach of Entity Framework
,
Basically we have 3 approach in that,
Code-First
Model-First
Database-First
Upvotes: 0