2012-02-14 3 views

답변

2
ARHIEntities ARHModel = new ARHIEntities(); // ARHIEntities is the model name 
var qry = from gu in ARHModel.gene_genunit 
      from cu in ARHModel.cont_unitati 
      where gu.COD_UNIT == cu.COD_UNIT 
      select new { cu, gu }; 

편집 : 당신이 그것을하지 않습니다 "뜻 무엇 where

+0

이것은 크로스 조인이며 SQL에서 왼쪽 조인을 수행하는 것과 동일하지 않습니다. –

6

LINQ 상당 Linq에를 쿼리를 생성하고 배울

from gu in context.Gene 
join cu in Context.Cont 
on gu.Code_Unit equals cu.Code_Unit 
select new 
{ 
    gu, 
    cu 
} 

사용 LinqPad

+0

추가 언급 'FROM 절' "? – Misi

+0

@ 미시 From 절에 대한 내 의견을 무시합니다. 코드를보세요. –

관련 문제