i have query return count based on condition
var query = (from in this.db.servers (a.date >= fromdp.selecteddate.value && a.date <= todp.selecteddate.value) group entityfunctions.truncatetime(a.date) p select new { b = p.count()}).orderby( x=> x.b);
edit
when binded listbox's itemsource this,
dummy.itemssource = query.tolist();
xaml
<listbox x:name="dummy" itemssource="{binding}" />
which displays output this
how avoid member assignment "b" here , display integer values? possible
just guess should avoid using anonymous type in here selecting count directly:
var query = (from in this.db.servers (a.date >= fromdp.selecteddate.value && a.date <= todp.selecteddate.value) group entityfunctions.truncatetime(a.date) p select p.count()).orderby(x => x);
Comments
Post a Comment