Three things need to happen before you can use Entity Framework:
- Add reference to “System.Data.Entity”.
- Make sure your config file (app.config or web.config) contain the connection string to the entity.
- If your Entity Framework (.edmx file) is located in another project, you will need to add reference to that project.
Here, my Entity Framework (DataModel.edmx) is under Database project. In order to use it in Database.Test project, I am referencing Database project in Database.Test project as you can see below: