Skip to content

C# 2008 app reference to database problem

dc

Asked Sep 5, 2012, 2:17 PM EDT1 answer
Share
LinkedInX
In a C# 2008 console application, I am getting the following error:
"Error 4 The type or namespace name 'eDataContext' could not be found (are you missing a using directive or an assembly reference?)".
I am getting this error on the following line of code: "eDataContext rptData = new eDataContext();".

I have created the *.dbml file, I have dragged a table onto the designer surface, I have added the *.dbml   file to  the project folder that will be using the *.dbml file, and I have built the application.

The name 'eDataContext', in the name of the datacontext object that is located in the eD.designer.cs file.

The only thing that i can think to try is to add something in an app.config file, but I do not know what to add.

Thus can you tell me and/or point me to a reference on what i can do to solve this problem?

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Akkiraju Ivaturi
    0
    Check if your project has reference to EntityFramework.dll and System.Data.Entity? If not try to add the references. It might resolve your problem.
    0