Data Source Configuration
In This Topic
To configure the datasource for the application, let us use C1NWind database, the C1NWind.mdf file, available on your system in C:\Users\<username>\Documents\ComponentOne Samples\ASP.NET MVC\MVC\CS\MvcExplorer\App_Data. The steps to generate database for the application are as follows:
- Add C1NWind.mdf file to the App_Data folder in the Solution Explorer.
- In the Solution Explorer, right-click Models|Add New Item|Data, and select ADO.NET Entity Data Model.
- Name the model as C1NWind, and click Add.
- In the Entity Data Model Wizard, select EF Designer from database, click Next.
C1NWind.mdf database is added to the data connection dropdown.
- Click Next to choose Entity Framework version, and click Next.
- In the Choose Your Database Objects and Settings, select Tables, and click Finish.
If you can see C1NWind.edmx added to your project under the Models folder, you have successfully configured the datasource for your application.