Entity Framework Code First

Setelah database ditambahkan ke Project, kita dapat menulis query dan mengupdate database kita. Entity Framework adalah API data Object Relational Mapping (ORM) yang fleksibel yang memungkinkan developer melakukan query dan mengupdate data dalam database dengan cara Obejct Oriented.
EF versi 4 mensupport paradigma Code First, yaitu membuat Objek Model dengan menulis Class sederhana (disebut juga POCO, plain old CLR objects) dan dapat membuat database on the fly dari Class-Class yang anda buat.
Untuk dapat mempergunakan Code First, anda harus terlebih dahulu menginstall EFCode First Library.
atau install dari Package Manager Console:

PM> Install-Package EntityFramework
You are downloading EntityFramework from Microsoft, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkID=211010. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'EntityFramework 4.1.10331.0'
Successfully added 'EntityFramework 4.1.10331.0' to MvcApplication2

Jika sudah terinstall, di Solution Explorer, pada projek kita, di bawah folder References akan terdapat EntityFramework

About abunajiyah
A Programmer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: