Also a good place to start learning lambda expressions. :-)
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************************************************
| Think outside the box!
|
*************************************************
"Frans Bouma [C# MVP]" <pe******************@xs4all.nlwrote in message
news:xn***************@news.microsoft.com...
Andy wrote:
>Hi,
I have a sql statement which I'm trying to translate to Linq. Not
sure how to do this.
select *
from Table1 t1
inner join Table2 t2 on t1.Id = t2.ParentId AND t2.Type = 'A'
Thanks
Andy
the second predicate has to be moved to the where clause. So
t2.Type=='A' has to be in the where, the rest can be in the join.
FB
--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------