Reputation: 8138
I'm getting started on Linq to Entities and the example references a namespace called System.Data.Objects. My environment doesn't include this namespace and I can't find the DLL that contains it. Anywone know where I'd find it?
Upvotes: 1
Views: 4032
Reputation: 43207
If you have created a Website targetting .Net 3.5 [assuming you have 3.5 SP1 installed] then you have the support for ADO.NET Entity Framework in your Project. You can add an Entity model from Add New Item dialog. This means that your Project has a reference to System.Data and exposes the System.Data.Objects namespace. There's no case why it should not happen.
This namespace is very essential in developing applications with ADO.NET Entity Framework, since it provides you the Objects that can handle Entities , Entity Queries and Query Results.
For ex:
If you want to store all the Customers result-set returned by a Qry or Expression, then you can use following syntax to do so..
ObjectResult<Customer> _Resultset = ctx.Customers;
Likewise you can use ObjectQuery to store Entity Queries.
You can refer to following link in order to learn more about this.
Upvotes: 2
Reputation: 872
I had the same problem.
I downloaded code for a Microsoft tutorial and started working with it, but I hadn't added any EDM items to the solution myself, so the reference was missing.
I used "Add New Item > ADO.Net Entity Data Model" in VS2010 to add a new, empty EDM to the solution.
Then I re-built the solution. No compiler errors.
Then I deleted the empty EDM.
Adding the EDM to the solution added the necessary references.
Upvotes: 3
Reputation: 8138
Never mind. It appears to be part of the core framework. The tutorial I'm working from is from Microsoft so it isn't very clear... :-)
Upvotes: 1