Getting Started with Entity Framework Code First

Leave a Comment

Whether you have an existing database or not, you can code your own classes and properties that correspond to tables and columns and use them with the Entity Framework without an .edmx file. That's why you sometimes see this approach called code only, although the official name is Code First. The mapping between the store schema and the conceptual model represented by your code is handled by convention and by a special mapping API.

If you don't yet have a database, the Entity Framework can automatically create the database for you, or drop and re-create it if the model changes. This tutorial series uses Code First development.

The data access API that was developed for Code First is based on the DbContext class. This API can also be used with the Database First and Model First development workflows. For more information, see When is Code First not code first? on the Entity Framework team blog.


Getting Started with Entity Framework Code First
Introduction to POCO classes in Entity Framework
Create First MVC application in Visual Studio 2010
Creating the Entity Framework Data Model in Visual Studio
Create classes for each entity using Entity Framework
Create the Database Context using Entity Framework
Setting the Connection String in MVC Asp.Net Application

Creating a Controller and Views in MVC application

0 comments:

Post a Comment