所以,球员......我有这样的疑问:Linq to SQL - 输出类型? (不显示信息只显示型)
Allow the user view the top five selling products in descending order grouped by country.
这里是我的代码有:
var q6 = (from t in northwind.Products
join o in northwind.Suppliers on t.SupplierID equals o.SupplierID
group t.UnitPrice by new {o.Country, t.UnitPrice} into grouped
let county = grouped.Key.Country
let price = grouped.Key.UnitPrice
group new
{
Country = county,
Product = price
}
by county
into countryGrouped
select new
{
Output = countryGrouped.Key,
Price = countryGrouped.OrderBy(c => c.Product)
});
lbxTop5.ItemsSource = q6;
它的工作原理就像输出价格一样。
价格出来是这样的:
谁能告诉我如何输出价格以适当的格式,而不是数据类型?
谢谢!
这可能与你指定的控制 – codingbiz 2013-04-24 16:52:58