Click “Next”, the following window will appear:
Select the required database objects as per your needs and click on the “Finish” button.
An edmx file will be added into the solution as per the image show under the following:
These are the very basic steps to create an entity object from an existing database as shown above. Now let’s proceed further and get to the core topic to use Joins with Entity Framework.
Now open the RegisterController class file and write my code in Action “Verify” also as shown in the following image:
You can see the code snippet in the above diagram states that we are using an inner join on two tables, Orders and OrderDetails, and return the result to the view (that is of type OrderModel having the following code snippet).