Before Using Entity Framework

Three things need to happen before you can use Entity Framework:

  1. Add reference to “System.Data.Entity”.
  2. Make sure your config file (app.config or web.config) contain the connection string to the entity.
  3. 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:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s