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

pencilslate picture pencilslate · Aug 14, 2009 · Viewed 106.1k times · Source

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!

Answer

Joshua Belden picture Joshua Belden · Aug 14, 2009

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