List<int> ListIdProducts = new List<int>();
var IdProductKey = from a in me.ProductKeywords where a.Keyword == item.Id select a;
foreach (var item2 in IdProductKey)
{
ListIdProducts.Add(item2.Product.Value);
}
结果是:5 6 7 5 2 5
我需要得到以下 5=3, 6=1, 7=1, 2=1