It is easy to create a simple Entity Framework model using the Adventure Works SQL Server database. I will use a WPF Model View project as my container. To start, create a new WPF Model View Application as described in this posting:
Right click on the Model folder in the Solution Explorer, select Add and then select New Item from the context menu.
Select the ADO.Net Entity Data Model template and name it AdventureWorks.edmx.
On the next dialog, create a connection to the AdventureWorksdatabase you plan on using, or select sn existing oneĀ usingĀ the drop down. Use the default recommendation for naming and storing the connection string in the App.config file. In my case, the connection name is prefixed with Milo because that is the name of my local machine.
On the next dialog, select the option to create a model from a database.
Then select the tables you want to include. I selected three tables from the Sales schema for this example.
That is all there is to it. The model should open up in the GUI designer.
In the next post I will show a couple of property changes I make to support future samples that use the model.





