我有两个参数传递给该方法,我需要将它们附加到最终查询列表中。
(第一个参数)
string[] Price= new string[5];
Price= new string[] { "50", "25", "35" };
(第二个参数)
List<string> DiscountPrice= new List<string>();
DiscountPrice.Add ("10");
DiscountPrice.Add ("5");
DiscountPrice.Add ("3");
var list= (from d in context.List
where ....
select new MyNewList
{
Name = d.Name,
Country = d.Country,
**Price = ??** //how do I attach the parameters one by one? In the order they were saved?
**DiscountPrice** = ??
}).ToList<MyNewList>();