hi guys,
im a newbie on subsonic
could someone interpret this sql query into subsonic code?
SQL query:
select Count( Trans.TransId )
from Trans
inner join LPSRFileAllocation on LPSRFileAllocation.C4FilePath = trans.FileName
or LPSRFileAllocation.LGAFilePath = Trans.FileName
where
LPSRFileAllocation.C4FilePath = "\\omed-dev-021\RawData\Hybrid\LPSR-Nexiv\LGA-08397510.csv"
or
LPSRFileAllocation.LGAFilePath = "\\omed-dev-021\RawData\Hybrid\LPSR-Nexiv\LGA-08397510.csv"
i generate a subsonic code below but doesn't work for me:
new Select(Aggregate.Count(Tran.TransIdColumn))
.From(Tran.Schema)
.InnerJoin(LPSRFileAllocation.C4FilePathColumn, Tran.FileNameColumn)
.Or(LPSRFileAllocation.LGAFilePathColumn, Tran.FileNameColumn)
.Where(Tran.Columns.RecordStatus).IsEqualTo(true)
.Or(LPSRFileAllocation.Columns.C4FilePath).IsEqualTo(filePath)
.Or(LPSRFileAllocation.Columns.LGAFilePath).IsEqualTo(filePath)
.ExecuteScalar<bool>();
thanks in advance..