How to create an entity type and then generate a database table from it?
I know this feature was not supported two years ago in EF, what about now?
How to create an entity type and then generate a database table from it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Now, Entity Framework introduced these feature.
Basically, with only two steps is sufficient for this, please see below steps to go:
Create your Entity
Create Context class
However, you may need more coding in Global.ascx for advance options but these are the basic steps.
A database named “OdeToFoodDb” will create and a table named “Resturant” also will create by these steps.