Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
List<ren> renewedorderlist = (from ordernum in salesContext.SL_OrderIdMapper
where ordernum.OrderNumber == placeOrderModel.OrderInfo.OrderID
from orderDetail in salesContext.SL_OrderDetails
where ordernum.OrderId == orderDetail.OrderId
 from renProducts in salesContext.products
where renProducts.pid == orderDetail.ProductID
from licenseDetails in salesContext.SL_LicenseDetails
where licenseDetails.OrderDetailId == orderDetail.OrderDetailId
from licenses in salesContext.SL_License
where licenses.LicenseId == licenseDetails.LicenseId
from oldProducts in salesContext.products
where oldProducts.pid == licenses.ProductID group licenses.LicenseId by ordernum.OrderId into g
select new ren
{
 OrderId=ordernum.OrderId,
 OldProductName = oldProducts.productdesc,
 NewProductName = renProducts.productdesc,
 Quantity = orderDetail.Quantity,
 LicenseID = licenses.LicenseId.ToString()
}).ToList<ren>();
Posted
Updated 1-May-14 20:51pm
v2
Comments
ZurdoDev 2-May-14 7:41am    
What error?
[no name] 2-May-14 9:06am    
You are using ToList incorrectly.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900