Ali Foroughi
Ali Foroughi

Reputation: 4619

EF4 and Code first approach

I want to learn about Code First development in EF4 and after googling about it find out that I must download and install some thing named Entity Framework CTP and use it to develop a project by code first approach.

But I have a question , is it the only solution to do that(Code first develop)? I mean , I SHOULD use the CTP ? is there any solution to use tool that already been in Dot Net 4 or VS2010?

any namespace or class exists in dot net 4 to do that?can you just name them for me? for example after i search i found DataAnnotation namespace. what else that i must use for code first develop?

Upvotes: 3

Views: 206

Answers (4)

Mithrandir
Mithrandir

Reputation: 25397

The Code First Method is officially part of Entity Framework 4.1. You can download and install it via NuGet (http://nuget.org/packages/entityframework). EF is now at version 4.3 or will be soon atleast.

Upvotes: 3

The Ed R
The Ed R

Reputation: 326

It's certainly not the only object relational mapper(ORM) with support for code first development. Fluent NHibernate is another popular code first ORM.

Upvotes: 2

TheVillageIdiot
TheVillageIdiot

Reputation: 40527

In the Visual Studio 2010 install NuGet Package Manager. Now head to View -> Other Windows -> Package Manager Console and console type:

install-package entityframework

This will install EntityFramework in your solution and add the required references to your project.

Now you can write your classes, code and DbContext class and start working with code-first EF approach.

More about EF-CF can be found on Julie Lerman's site http://www.learnentityframework.com

Upvotes: 2

archil
archil

Reputation: 39501

Entity Framework 4.2 is released. As mentioned in link,

release is just a small update to the DbContext & Code First runtime. The features that were included in EF June 2011 CTP require changes to the Core Entity Framework Libraries that are part of the .NET Framework and will ship at a later date.

You can also read what Entity Framework June 2011 CTP offers

Upvotes: 2

Related Questions