Search code examples
c#.netvisual-studio-2008linq-to-entitiesentities

The type or namespace name 'Objects' does not exist in the namespace 'System.Data'


I am using entities, C# and SQL Server to create an n-tier app. I am creating some base classes common to all my DAL components. In this base class, i want to handle the connection state of the ObjectContext base class inherited by entities object.

Compiling throws the following error:

The type or namespace name 'Objects' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)

Also, the using statement System.Data.Objects doesn't resolve for the same reason.

I tried adding the assembly as reference, but couldn't find it in the .NET tab of assembly references.

Any thoughts? Thanks!


Solution

  • You need to add a reference to the .NET assembly System.Data.Entity.dll.