This project is read-only.

Strongly typed LINQ with DTOs

Oct 22, 2010 at 1:57 PM

When I code against the DAL, I get strongly typed LINQ queries.

However, when I use the DTO approach, it seems to only work by passing a string through to the LINQ functions, which then loses the benefits of strong typing.

Is this correct, or have I missed a 'using' statement or reference somewhere?


Oct 26, 2010 at 7:37 AM

Strongly typed LINQ is currently only supported against the DAL. The dto implementation was originally implemented to be an easy way to access data from your ajax based applications. Therefore, the goal was to building a json serializable object layer and a robust set of restful services. The WCF and Mocking layers were easy addons to this architecture. As such, the focus on building strongly typed querying into the application has yet to be a major focus. 

Implementation of an EFDAL and exposing it through DataServices was our first step toward addressing this problem. As we learn more about the approach taken to solve these problems using Microsoft's DataServices, we plan to build that technology into the existing DTO layers.