条件に基づいてカウントを返すクエリがあります
var query = (from a in this.db.Servers
where (a.Date >= fromDP.SelectedDate.Value && a.Date <= toDP.SelectedDate.Value)
group a by EntityFunctions.TruncateTime(a.Date) into p
select new { b = p.Count()}).OrderBy( x=> x.b);
編集
このように ListBox の ItemSource にバインドすると、
dummy.ItemsSource = query.ToList();
XAML
<ListBox x:Name="dummy" ItemsSource="{Binding}" />
このような出力が表示されます
ここでメンバー割り当て「b」を回避し、整数値のみを表示するにはどうすればよいですか? 出来ますか