我需要寫在LINQ編寫查詢 例如後加入statment:加入聲明的LINQ到SQL
var Query = (from Tab in Db.Employees
select Tab)
,因爲我有一些情況下進行連接操作,從而
我需要做的是在此查詢Query.Join(Join with another Table like Department);
我需要的語法
if (DeptID != -1){ Query.Join(Join with table Department where FkDeptID = DeptID); }
加入什麼?還有其他什麼數據我們需要更多信息。 –
你想'加入()'到什麼? –