not able to get this, can someone help for this LINQ query?
select col1,
(select col2 from tbl2 where tbl2.ID=tbl1.tbl2ID) as [col2]
from tbl1
scenario is like this
I want all records from Jobs table, Jobs has sectorID column, I also want SectorName. Also it has CountryID and CityID and I need CountryName and CityName too.
You need to do some joining. Not knowing your structure, something like the following might work.
Create a simple view model to hold your information:
Then populate a list based on what you need
Any additional fields defined in JobView simply need to be populated during the select.