у меня есть таблица
SELECT JM.jobNum+'.'+CONVERT(VARCHAR,TL.tlPhasenum) AS [COST CODE],EM.empnum+'‌' AS [EMPLOYEE NUMBER],TL.tlDateWorked AS [DATE],tl.tlOT,tl.tlStraightTime INTO #TempTable
FROM mqTimeReportingTimeLogs AS TL
INNER JOIN mqJobMaster AS JM ON TL.tlJobId=JM.jobId
INNER JOIN mqEmployeeMaster AS EM ON TL.tlEmployeeId=EM.empId
WHERE
TL.tlCompanyId in (select * from #TempCompanies)
AND (@weekending='' or tlWeekEnding=CONVERT(DATE,@weekending))
AND (@jobid=0 or TL.tlJobId=@jobid)
AND (@startdate='' or TL.tldateworked between convert(date,@startdate) and convert(date,@enddate))
и следующий запрос для разделения строки на две
SELECT * INTO #TempTable2
FROM (
SELECT [COST CODE],[EMPLOYEE NUMBER],[DATE],value as [Hours],col as [Time Type]
from #TempTable
CROSS APPLY
(
VALUES('1',tlStraightTime),('2',tlOT) --1:ST 2:OT
) C (COL, VALUE)
) SRC
Теперь я хочу реализовать то же самое в linq, как это использовать logi c в LINQ