2009-03-28 4 views
0

엔티티에 대한 LinQ : 람다 식

 
 
var db = new PracticeEntities(); 
var destinations = db.DestinationDetails. 
      Where(dd => dd.Language.Lang == "en-US" && 
      dd.Destination.Client.Any(c => c.Email == "[email protected]")); 
 

다음과 같이하십시오.

 
 
var destinations = 
    from destinations in db.DestinationDetails 
     where detail.Language.Lang == "en-US" && 
      dd.Destination.Client.Any(db.Client 
 

그러나, 어떻게해야할지 모르겠다.

고마워!

답변

3
var destinations = from dd in db.DestinationDetails 
        where dd.Language.Lang == "en-US" && 
         dd.Destination.Client.Any(c => c.Email == "[email protected]"); 

변수 이름 dd은 원래 버전에서 람다의 매개 변수 선언의 일어난다.