我从不同的类中分别获取购物车数量,如下所示。我想从列表中包含的数量中减少购物车数量。那么如何在我的查询中包含它。任何人请建议我。
//int quantityinshoppingcart = classes.ShoppingCart.checkingQuantity(CustomerId,ItemId);
//Binds the data to the repeater control
rptcontrol.DataSource = from p in l_List
select new
{
ItemId = p.ItemId,
ItemName = p.ItemName,
Quantity = p.Quantity,
//I want quantity as (Quantity = p.quantity - quantityinshoppingcart),
};
rptcontrol.DataBind();