{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5445","repository_url":"https://api.github.com/repos/aspnet/EntityFramework","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5445/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5445/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5445/events","html_url":"https://github.com/aspnet/EntityFramework/issues/5445","id":155974806,"number":5445,"title":"Invoke in expression tree throws NotImplementedException","user":{"login":"jacob-robertson","id":1940447,"avatar_url":"https://avatars.githubusercontent.com/u/1940447?v=3","gravatar_id":"","url":"https://api.github.com/users/jacob-robertson","html_url":"https://github.com/jacob-robertson","followers_url":"https://api.github.com/users/jacob-robertson/followers","following_url":"https://api.github.com/users/jacob-robertson/following{/other_user}","gists_url":"https://api.github.com/users/jacob-robertson/gists{/gist_id}","starred_url":"https://api.github.com/users/jacob-robertson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacob-robertson/subscriptions","organizations_url":"https://api.github.com/users/jacob-robertson/orgs","repos_url":"https://api.github.com/users/jacob-robertson/repos","events_url":"https://api.github.com/users/jacob-robertson/events{/privacy}","received_events_url":"https://api.github.com/users/jacob-robertson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-20T14:24:20Z","updated_at":"2016-05-20T14:24:20Z","closed_at":null,"body":"In my use case, I'm building the filters that are passed into the `IQueryable.Where()` call dynamically.  Since I've updated to the RC2 release, any expression tree passed in causes a `NotImplementedException` to be thrown.  According to the stack trace, the culprit is here:\r\n\r\n    at Microsoft.EntityFrameworkCore.Query.Internal.ExpressionEqualityComparer.GetHashCode(Expression obj)\r\n\r\nI've attached a sample that should demonstrate the issue.  \r\n            \r\n    Expression<Func<Guitar, bool>> expression = g => g.Model.Id == modelId;\r\n    var param = Expression.Parameter(typeof(Guitar), \"g\");\r\n\r\n    var guitars = context.Guitars\r\n        //This works\r\n        .Where(expression);\r\n        //This does not   \r\n        .Where(Expression.Lambda<Func<Guitar, bool>>(Expression.Invoke(expression, param), param));\r\n\r\n[EFTester.zip](https://github.com/aspnet/EntityFramework/files/274759/EFTester.zip)\r\n"}}
{"actor":{"display_login":"jacob-robertson"}}