Problem in ADO.Net Data Service when working with Entity Model?

You didn't show us your Product class - that class needs to have the DataServiceKey("ProductID") on it - in order to make it clear to the DataService how to identify a product.

Without the exact error it's hard to guess what the actual problem is. But in general this will not work. The reason is the difference in behavior of IQueryable between the LINQ to EF and LINQ to Objects.

If you specify the ObjectContext (NorthwindEntities in your case) as the context for the data service, the WCF Data Services assume LINQ to EF behavior and generates the queries in such a way that LINQ to EF can handle it. If you specify a non-ObjectContext class (your own in this case) as the context for the data service, it assumes LINQ to Objects behavior and generates somewhat different queries. The main difference is null propagation (LINQ to Objects requires explicit null propagation, while LINQ to EF doesn't like it and handles it implicitely), but there are other smaller differences as well.

Do you really need to use your own class as the context and not the EF generated ObjectContext based class?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions