{"action":"created","issue":{"url":"https://api.github.com/repos/StefH/KendoGridBinderEx/issues/15","labels_url":"https://api.github.com/repos/StefH/KendoGridBinderEx/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/StefH/KendoGridBinderEx/issues/15/comments","events_url":"https://api.github.com/repos/StefH/KendoGridBinderEx/issues/15/events","html_url":"https://github.com/StefH/KendoGridBinderEx/issues/15","id":69000894,"number":15,"title":"problem in ApplyAggregates when filtering produces zero entities","user":{"login":"kslesinsky","id":1963973,"avatar_url":"https://avatars.githubusercontent.com/u/1963973?v=3","gravatar_id":"","url":"https://api.github.com/users/kslesinsky","html_url":"https://github.com/kslesinsky","followers_url":"https://api.github.com/users/kslesinsky/followers","following_url":"https://api.github.com/users/kslesinsky/following{/other_user}","gists_url":"https://api.github.com/users/kslesinsky/gists{/gist_id}","starred_url":"https://api.github.com/users/kslesinsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kslesinsky/subscriptions","organizations_url":"https://api.github.com/users/kslesinsky/orgs","repos_url":"https://api.github.com/users/kslesinsky/repos","events_url":"https://api.github.com/users/kslesinsky/events{/privacy}","received_events_url":"https://api.github.com/users/kslesinsky/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/StefH/KendoGridBinderEx/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-16T20:15:15Z","updated_at":"2015-04-17T21:08:58Z","closed_at":null,"body":"Hi.  I noticed a problem when applying a filter that didn't match any rows.  It was a \"sequence contains no elements\" exception in ApplyAggregates(), in the line before the return:\r\n\r\nvar aggregates = (aggregatesQuery.First() as DynamicClass).GetAggregatesAsDictionary();\r\n\r\n...because the evaluation of aggregatesQuery has zero elements.  I would suggest adding a line before that one like:\r\n\r\nif (aggregatesQuery.Count() == 0) return null;\r\n\r\nMy test has two sum aggregates.  I suspect it can be reproduced using the Test_KendoGridModelBinder_Aggregates_WithIncludes() unit test and applying a filter like CompanyName eq \"Q\"."},"comment":{"url":"https://api.github.com/repos/StefH/KendoGridBinderEx/issues/comments/94075756","html_url":"https://github.com/StefH/KendoGridBinderEx/issues/15#issuecomment-94075756","issue_url":"https://api.github.com/repos/StefH/KendoGridBinderEx/issues/15","id":94075756,"user":{"login":"kslesinsky","id":1963973,"avatar_url":"https://avatars.githubusercontent.com/u/1963973?v=3","gravatar_id":"","url":"https://api.github.com/users/kslesinsky","html_url":"https://github.com/kslesinsky","followers_url":"https://api.github.com/users/kslesinsky/followers","following_url":"https://api.github.com/users/kslesinsky/following{/other_user}","gists_url":"https://api.github.com/users/kslesinsky/gists{/gist_id}","starred_url":"https://api.github.com/users/kslesinsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kslesinsky/subscriptions","organizations_url":"https://api.github.com/users/kslesinsky/orgs","repos_url":"https://api.github.com/users/kslesinsky/repos","events_url":"https://api.github.com/users/kslesinsky/events{/privacy}","received_events_url":"https://api.github.com/users/kslesinsky/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T21:08:58Z","updated_at":"2015-04-17T21:08:58Z","body":"Hmm, why is there now a dependency on \"CreateNewNuGetPackageFromProjectAfterEachBuild\"?"}}