{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6620","repository_url":"https://api.github.com/repos/aspnet/EntityFramework","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6620/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6620/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6620/events","html_url":"https://github.com/aspnet/EntityFramework/issues/6620","id":179577584,"number":6620,"title":"GroupBy multiple keys throws exception in 1.0.1","user":{"login":"StefH","id":249938,"avatar_url":"https://avatars.githubusercontent.com/u/249938?v=3","gravatar_id":"","url":"https://api.github.com/users/StefH","html_url":"https://github.com/StefH","followers_url":"https://api.github.com/users/StefH/followers","following_url":"https://api.github.com/users/StefH/following{/other_user}","gists_url":"https://api.github.com/users/StefH/gists{/gist_id}","starred_url":"https://api.github.com/users/StefH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefH/subscriptions","organizations_url":"https://api.github.com/users/StefH/orgs","repos_url":"https://api.github.com/users/StefH/repos","events_url":"https://api.github.com/users/StefH/events{/privacy}","received_events_url":"https://api.github.com/users/StefH/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-27T18:39:40Z","updated_at":"2016-09-27T20:43:47Z","closed_at":null,"body":"### GroupBy multiple keys throws exception\r\n\r\nExample code\r\n```c#\r\nvar expected = _context.Posts\r\n  .GroupBy(x => new { x.BlogId, x.PostDate })\r\n  .OrderBy(x => x.Key.PostDate)\r\n  .ToArray();\r\n```\r\n\r\n### Exception + StackTrace is like:\r\n```\r\nTest Name:\tSystem.Linq.Dynamic.Core.Tests.EntitiesTests.Entities_GroupBy_MultiKey\r\nTest FullName:\tSystem.Linq.Dynamic.Core.Tests.EntitiesTests.Entities_GroupBy_MultiKey\r\nTest Source:\tC:\\Projects\\GitHub\\System.Linq.Dynamic.Core\\test\\System.Linq.Dynamic.Core.Tests\\EntitiesTests.GroupBy.cs : line 46\r\nTest Outcome:\tFailed\r\nTest Duration:\t0:00:00,097\r\n\r\nResult StackTrace:\t\r\nat System.Dynamic.Utils.ExpressionUtils.ValidateOneArgument(MethodBase method, ExpressionType nodeKind, Expression arguments, ParameterInfo pi)\r\n   at System.Linq.Expressions.Expression.Call(MethodInfo method, Expression arg0, Expression arg1, Expression arg2, Expression arg3)\r\n   at Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor.TrackEntitiesInResults[TResult](QueryModel queryModel)\r\n   at Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor.CreateQueryExecutor[TResult](QueryModel queryModel)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass19_0`1.<CompileQuery>b__0()\r\n   at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)\r\n   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)\r\n   at Remotion.Linq.QueryableBase`1.GetEnumerator()\r\n   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source, Int32& length)\r\n   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)\r\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n   at System.Linq.Dynamic.Core.Tests.EntitiesTests.Entities_GroupBy_MultiKey() in C:\\Projects\\GitHub\\System.Linq.Dynamic.Core\\test\\System.Linq.Dynamic.Core.Tests\\EntitiesTests.GroupBy.cs:line 48\r\nResult Message:\tExpression of type 'System.Collections.Generic.List`1[System.Func`2[System.Linq.IGrouping`2[<>f__AnonymousType2`2[System.Int32,System.DateTime],System.Linq.Dynamic.Core.Tests.Helpers.Entities.Post],System.Object]]' cannot be used for parameter of type 'System.Collections.Generic.IList`1[System.Func`2[System.Linq.Dynamic.Core.Tests.Helpers.Entities.Post,System.Object]]' of method 'System.Collections.Generic.IEnumerable`1[System.Linq.IGrouping`2[<>f__AnonymousType2`2[System.Int32,System.DateTime],System.Linq.Dynamic.Core.Tests.Helpers.Entities.Post]] _TrackGroupedEntities[<>f__AnonymousType2`2,Post](System.Collections.Generic.IEnumerable`1[System.Linq.IGrouping`2[<>f__AnonymousType2`2[System.Int32,System.DateTime],System.Linq.Dynamic.Core.Tests.Helpers.Entities.Post]], Microsoft.EntityFrameworkCore.Query.QueryContext, System.Collections.Generic.IList`1[Microsoft.EntityFrameworkCore.Query.Internal.EntityTrackingInfo], System.Collections.Generic.IList`1[System.Func`2[System.Linq.Dynamic.Core.Tests.Helpers.Entities.Post,System.Object]])'\r\n```\r\n\r\n\r\n\r\n### Further technical details\r\n\r\nEF Core version: 1.0.1\r\nOperating system: Windows 10\r\nVisual Studio version: (VS 2015)\r\n\r\nOther details about my project setup:\r\nhttps://github.com/StefH/System.Linq.Dynamic.Core/blob/_reproduce_EF_GroupByError/test/System.Linq.Dynamic.Core.Tests/EntitiesTests.GroupBy.cs#L43"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/249992508","html_url":"https://github.com/aspnet/EntityFramework/issues/6620#issuecomment-249992508","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6620","id":249992508,"user":{"login":"StefH","id":249938,"avatar_url":"https://avatars.githubusercontent.com/u/249938?v=3","gravatar_id":"","url":"https://api.github.com/users/StefH","html_url":"https://github.com/StefH","followers_url":"https://api.github.com/users/StefH/followers","following_url":"https://api.github.com/users/StefH/following{/other_user}","gists_url":"https://api.github.com/users/StefH/gists{/gist_id}","starred_url":"https://api.github.com/users/StefH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefH/subscriptions","organizations_url":"https://api.github.com/users/StefH/orgs","repos_url":"https://api.github.com/users/StefH/repos","events_url":"https://api.github.com/users/StefH/events{/privacy}","received_events_url":"https://api.github.com/users/StefH/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T20:43:47Z","updated_at":"2016-09-27T20:43:47Z","body":"This specific test worked fine in 1.0.0"}}
{"actor":{"display_login":"StefH"}}