3
能否請你幫我弄清楚這一個? 我需要更換一個連接與OSLP表外連接。似乎有人誰不是在LINQ到實體專家有點棘手。我會怎麼做?LINQ到實體 - LEFT OUTER JOIN
var surgeonList = (
from item in context.T1_STM_Surgeon
.Include("T1_STM_SurgeonTitle")
.Include("OTER")
where item.ID == surgeonId
join reptable in context.OSLP
on item.Rep equals reptable.SlpCode
select new
{
ID = item.ID,
First = item.First,
Last = item.Last,
Rep = reptable.SlpName,
Reg = item.OTER.descript,
PrimClinic = item.T1_STM_ClinicalCenter.Name,
Titles = item.T1_STM_SurgeonTitle,
Phone = item.Phone,
Email = item.Email,
Address1 = item.Address1,
Address2 = item.Address2,
City = item.City,
State = item.State,
Zip = item.Zip,
Comments = item.Comments,
Active = item.Active,
DateEntered = item.DateEntered
}).ToList();
在此先感謝!
你能編輯您的文章,包括代碼塊,好嗎?這是不可能的閱讀。 – 2010-03-30 15:12:45
我做後不久,我看到了混亂...是更好? – Nix 2010-03-30 17:50:54