-->

Tuesday, March 29, 2016

How to use ADO.NET Entity Data model with database

How to use ADO.NET Entity Data model with database

ADO.NET Entity Data Model provides you a better and fast approach for communicating with database objects like Table, Stored Procedure etc. After added it, you have some models (classes ) which is related to tables and context classes. I mean to say that you can access database table directly by using context classes. In the context class, we have some public properties, through these we can retrieve table values. These all such things are related to model first approach , i mean to day that ADO.NET Entity Data model is based on model first approach. Let's start to configure it with the database, you can follow these steps , if you want to configure it:
Step-1 : Right Click on your project name , select add new item from the appearing menu. 
Step-2 :
How to use ADO.NET Entity Data model with database
 
Step-3: Press "OK" to continue.
Step-4: Select "EF designer from Database" option in the Entity Data Model wizard.
Step-5:  Now, press Next to continue in model wizard, select Connection string from Dropdown menu if exists. You can create "New Connection" by using Sql Server Database.

Entity Data Model Wizard

Step-6: Also select "Save Connection String into web.config file" CheckBox to save your whole connection parameter in web.config file.
Step-7: Press "Next" to continue. Select either all of them  Table, Views, Stored processor and one of them.
How to use ADO.NET Entity Data model with database

Step-8: Click to "Finish" Button.

Read other related articles

Also read other articles

© Copyright 2013 Computer Programming | All Right Reserved