I try to extract the sub query to …

Comment posted on How To: Subqueries In LINQ to SQL by Yogesh Ramakrishnan

I try to extract the sub query to its own method to make it easy to read. Do you see any issues with that?
As always I find this blog very informative.

Recent comments by Yogesh Ramakrishnan

powered by SEO Super Comments



2 Responses to “I try to extract the sub query to …”

  1. I try to extract the sub query to its own method to make it easy to read. Do you see any issues with that?
    As always I find this blog very informative.

  2. Run it through LINQPad…

    This won’t work as you’d hope.

    First, it’ll select all of the columns from the tables in your primary query (rather than just the columns you need to shape your result object). Then, it’ll fire the subquery (which now resides inside its own function) once for each result from the primary query. Decidely not the desirable result.

Rss Feed