In what I hope to be my last prerequisite post for Entity Framework on LINQPad, I will create a Data Context for my Entity Model Assembly.
I like to use LINQPad as a snippet editor because of its cool Dump() extension method. This platform makes it easy to play What If with a new technology.
For the purpose of these steps, I’m going to pretend you are using the assembly we created in [last post]. So here are the steps:
- Open LINQPad 4
- Click on Add Connection
- In the Choose Data Context window, choose Entity Framework.
- In the LINQPad Connection window, Browse for your EF Model Assembly
- In the Choose Custom Type:
- In Custom Type Name you should see PubsModel.pubsEntities
- In Entity Data Model, choose From Same Assembly, PubsModel should be in the list below
- Click OK
- Accept the remaining defaults by clicking OK.