Reputation: 125
How can I combine these 3 queries together and return them as datatable:
var TDD = 0;
var queryTDD = (from x in db.GetAll<WMINO>()
join y in db.GetAll<WMCTM>()
on x.PO_ID equals y.Contract_ID
select new
{
TDD = x.Payable,
});
Decimal TotalToDatePayable = 0;
TotalToDatePayable = ((from ori in db.GetAll<WMPORI>()
join ctm in db.GetAll<WMCTM>()
on ori.CTMSysID equals ctm.CTMSysID
select ori.ExB4Taxes).Sum());
var query = from ctm in db.GetAll<WMCTM>()
join vnm in db.GetAll<WMVNM>()
on ctm.VendSysID equals vnm.VendSysID
where ctm.WONOs == workOrder && ctm.TransType == "Purchase Order"
select new
{
ctm.CTMSysID,
ctm.Contract_ID,
ctm.VNM_ID};`
any help is appreciated
Upvotes: 1
Views: 66
Reputation: 176886
Not possible with this because each query has different result and using different columns and condition....
There is no meaning in combining this queries.............
Upvotes: 2