Entity Framework

What is Entity Framework

In asp.net to interact with database we use Ado.net. Entity framework allows you to also work with database.

As LINQ to SQL support only SQL Server database, Entity framework support almost all database like oracle, MySQL etc.

Continue...

DataBase Approach

Introduction of Database Approach

In Database First Approach first we create database and then we will create designer and code file using this database.

Continue...

Edmx file in Entity Framework

.edmx is basically an XML file which is generated when we added Entity Framework model. It is Entity Data Model Xml which contains designer (Model) and code file(.cs).

Continue...

Insert data using Entity Framework

In my last article we discussed about the edmx file. I hope now you are little bit familier with entity framework and we can start the basic functionality like insert, update, delete and select.

Continue...

Select data using Entity Framework

In my last article I discussed how to insert data in database using Entity Framework. I am taking the same example and file for this article. In this article I will show how we can select data from database using Entity Framework.

Continue...

Code First Approach

What is Code First Approach

In code first approach first we create classes (Code) and using this code database will be get generated. We need not use edmx file in code first approach. In code first approach code-first api is responsible to create and update database.

Continue...

Code First Relationship Implementation

In my last article we have discussed how to create entity framework and we also create one to one relationship also as every employee is having one department. In this example I want to show many to many relationship.

Continue...

Model Changes in Code First

In our previous example we work on code first approach with relationships. In this article I want to explain the changes of model in code first approach. After creating database using code-first-api if we need to change like addition of new column, data type of previous column etc.

Continue...

You can suggest topics which you want to add in this tutorial. Our team will try to add them. Thanks