Tuesday 1 March 2016

Beginning with database approach Part-1




This approach could be used with any previously build database, that why known as database model approach. It will help us to communicate with our database, with its predefined functions, and giving our C# code more power in terms of SQL too.


Step 1: Right- Click on the project main file.

Project Name > Add > New Item > ADO.NET Entity Data Model



Provide a relevant Name.

Step 2: Choose Modal Contents :





Select Generate from database > then Next >


Step 3:  : Make a new Connection to connect to database : (connection string)





Provide your database server name and select the database name, that you want to connect.
Click Next.

Step 4:  Select the table, views, stored procedure that are required from database, or select all.




Click > Finish.



Your entity Model is created:

You should have got your database tables in GUI format as below :





No comments:

Post a Comment