File->New>Project
And select the project template and click on ok
Go to Model->
And click on Add
Click on Finish
Right Click on the Screen
Add NewàEntity
Click on Ok
To add columns to the table students (Right Click on Add Newà Scalar Property)
I have added three columns to the table
In Model first approach first create model
Go to Model and Right Click and Select Generate Database From Model.
And Select New Connection
And click on Change
And Click on Ok.
Then Click on Ok Button.
Click on Next Button.
Click on Finish.
A script File will be generated with the name Model1.edmx.sql
Right click on it and select Execute
Connect to the database.
In the solution Explorer you can find
Now build the solution.
And go to controllers folder in the solution Explorer.(Right Click on the controllers folder and Select AddàController
Click on Add Button.
Now Run the program.
the output screen
No comments:
Post a Comment
Thank you for visiting my blog