We're slowly converting some code from VB.Net to C#, so I'm trying to learn the correct syntax in C#. Could someone help with this conversion? Basically I pull from a view all values that have not already been selected (saved) in another table and do a search on the items.
Employees a,b,c,d are in the Employee table. I have already selected and saved employee a and b. Now, when I re-run the search it should exclude employees a and b and only search for c and d if the search criteria is met.
This works fine in the vb.net query. I'm trying to figure out how to translate.
Thanks for any help! I think it's a very simple translation, I'm just having a bit of trouble with it.
Dim query = From tmp In context.vw_EmployeeDemographics _
Where Not (From jitrv In context.JITRuleValidations
Join e In context.Employees On jitrv.Employee_RecordID Equals e.RecordID _
Where jitrv.Parent_RecordID = Parent_RecordID _
Select e.RecordID).Contains(tmp.Parent_RecordID) And
context.fn_ConcatName(tmp.FirstName, tmp.MiddleName,
tmp.LastName).Contains(_master.pSearchValue1) _
Order By tmp.LastName.ToUpper(), tmp.FirstName.ToUpper() _
Select FirstName = tmp.FirstName, MiddleName = tmp.MiddleName,
LastName = tmp.LastName, RecordID = tmp.EmployeeID, _
DisplayText = context.fn_ConcatName(tmp.FirstName, tmp.MiddleName, tmp.LastName)