I'm not sure if I will go right. I have a Silverlight application and I am using the Entity Framework for this. I have two entities mapped to my database: header and details. I want to send a connection with a left background to get all headers and details, even if the header record does not contain detailed records. Here is the Linq query that I want to run from the client:
var query = from head in storeContext.Headers join detail in storeContext.Details on head.HeadId equals details.HeadId into group select new { Desc = head.Description, MyCount = group.Count() };
Since this is Silverlight, I need to build my request and then send it to the server using the storeContext.Load<T>() method from my domain service (Context on the client). Since this method expects a type, I don't know how to structure the call to return an anonymous type, since I dong above?
Am I doing all this wrong? Should I use the Invoke method for something like this? If so, how and where to determine the type that I want to return?
Someone can point me in the right direction, I would really appreciate it.
Thanks ... Scott
c # anonymous-types linq-to-entities silverlight entity-framework
Scott
source share