Refernce to Entity Framework

Posted on 2014-08-01
Medium Priority
Last Modified: 2014-08-04
I have a web MVC project with Entity Framework 4.x working fine.

Now I added a class library project in the same solution, and I have mapped different database tables successfully. .edmx is generated. Then I write a simple test class and try to build the this new project. I got error - The namespace name Infrastructure does not exist in a namespace System.Data.Entity ...

I googled it and was said I need a reference to the EntityFramework or need to install EntityFramework. I'm confused, as I already have a web MVC project working, and also .edmx has been built in the new class library project. So EntityFramework should not be a problem...?

What should do to remove this error?

I may need to add a reference to the class library project in the existing web project, so that the web project can use classes defined in the class library project, right?

I appreciate any help.
Question by:minglelinch
LVL 64

Accepted Solution

Fernando Soto earned 2000 total points
ID: 40235670
Do you have a using statement to the Infrastructure as shown below. This namespace is found in the EntityFramework.dll so make sure that the project this is in has the Entity Framework dll as well.

using System.Data.Entity.Infrastructure;

Author Closing Comment

ID: 40240456
Thank you

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question