suman goud

suman goud

  • NA
  • 176
  • 54.5k

Convert sqlserver query to lambda expression

Sep 6 2016 7:04 AM
i want convert following query to lambda expression (am working on mvc 4)
 
SELECT ap.BillDate,ap.Party,ap.Amount, apa.AmountAdjusted as amount
FROM Accounting_PendingBills ap
INNER JOIN Accounting_PendingBillsAdjusted apa
ON ap.VNumber=apa.VNumber
this query resulting in database
 
i have tried like this in controller
 
var data =
from ap in db.Accounting_PendingBills
join apa in db.Accounting_PendingBillsAdjusted on ap.VNumber equals apa.VNumber
select new {Accounting_PendingBills= ap,Accounting_PendingBillsAdjusted=apa };
 
 but not getting values here 
 

Answers (5)