I want to achieve the below scenario...
Table 1 - tAccessRequest of Database 1 columns - RequestId, CardNo and so on...... Table 2 - tBadge of Database 2 Columns - CardNo, CardStatus and so on...
I created a Request Class as below
public class RequestDetails
{
public int RequestID { get; set; }
public int RequestTypeID { get; set; }
public string PersonID { get; set; }
public int SectionCode { get; set; }
public int RequestStateID { get; set; }
public int ApprovalStatusID { get; set; }
}
Now I am writing two LINQ query
List< RequestDetails > listReq = new List< RequestDetails >();
listReq = (from PP in DB1.tAccessRequests
where (PP.RequestStateID == 1 || PP.ApprovalStatusID == 1) && PP.SectionCode != null
select new RequestDetails
{
RequestID = PP.RequestID,
SectionCode = PP.SectionCode.Value
}).ToList();
In the second LINQ query I want to achieve
var CardNoList = (from BC in prowatchContext.BADGE_C
where BC.STAT_COD != 'A' && BC.CARDNO in ("Select SectionCodefrom listReq"))
How to write the second LINQ query..
Please help