{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/1428","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/1428/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/1428/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/1428/events","html_url":"https://github.com/aspnet/EntityFramework/issues/1428","id":54798632,"number":1428,"title":"EntityQueryExecutor.AsyncExecuteCollection throws null ref exception","user":{"login":"egorpavlikhin","id":1160707,"avatar_url":"https://avatars.githubusercontent.com/u/1160707?v=3","gravatar_id":"","url":"https://api.github.com/users/egorpavlikhin","html_url":"https://github.com/egorpavlikhin","followers_url":"https://api.github.com/users/egorpavlikhin/followers","following_url":"https://api.github.com/users/egorpavlikhin/following{/other_user}","gists_url":"https://api.github.com/users/egorpavlikhin/gists{/gist_id}","starred_url":"https://api.github.com/users/egorpavlikhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egorpavlikhin/subscriptions","organizations_url":"https://api.github.com/users/egorpavlikhin/orgs","repos_url":"https://api.github.com/users/egorpavlikhin/repos","events_url":"https://api.github.com/users/egorpavlikhin/events{/privacy}","received_events_url":"https://api.github.com/users/egorpavlikhin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/EntityFramework/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/aspnet/EntityFramework/labels/pri0","name":"pri0","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"maumar","id":1591930,"avatar_url":"https://avatars.githubusercontent.com/u/1591930?v=3","gravatar_id":"","url":"https://api.github.com/users/maumar","html_url":"https://github.com/maumar","followers_url":"https://api.github.com/users/maumar/followers","following_url":"https://api.github.com/users/maumar/following{/other_user}","gists_url":"https://api.github.com/users/maumar/gists{/gist_id}","starred_url":"https://api.github.com/users/maumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maumar/subscriptions","organizations_url":"https://api.github.com/users/maumar/orgs","repos_url":"https://api.github.com/users/maumar/repos","events_url":"https://api.github.com/users/maumar/events{/privacy}","received_events_url":"https://api.github.com/users/maumar/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/aspnet/EntityFramework/milestones/7","html_url":"https://github.com/aspnet/EntityFramework/milestones/7.0.0","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/milestones/7/labels","id":666128,"number":7,"title":"7.0.0","description":"","creator":{"login":"rowanmiller","id":4741851,"avatar_url":"https://avatars.githubusercontent.com/u/4741851?v=3","gravatar_id":"","url":"https://api.github.com/users/rowanmiller","html_url":"https://github.com/rowanmiller","followers_url":"https://api.github.com/users/rowanmiller/followers","following_url":"https://api.github.com/users/rowanmiller/following{/other_user}","gists_url":"https://api.github.com/users/rowanmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/rowanmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rowanmiller/subscriptions","organizations_url":"https://api.github.com/users/rowanmiller/orgs","repos_url":"https://api.github.com/users/rowanmiller/repos","events_url":"https://api.github.com/users/rowanmiller/events{/privacy}","received_events_url":"https://api.github.com/users/rowanmiller/received_events","type":"User","site_admin":false},"open_issues":175,"closed_issues":153,"state":"open","created_at":"2014-05-21T19:25:32Z","updated_at":"2015-05-01T22:09:07Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-01-19T18:43:48Z","updated_at":"2015-05-03T01:58:44Z","closed_at":null,"body":"    NullReferenceException: Object reference not set to an instance of an object.\r\n    Microsoft.Data.Entity.Query.EntityQueryExecutor.AsyncExecuteCollection[T](QueryModel queryModel, CancellationToken cancellationToken)\r\n    Microsoft.Data.Entity.Query.EntityQueryProvider.AsyncQuery[T](Expression expression)\r\n    Microsoft.Data.Entity.Query.EntityQueryable`1.System.Collections.Generic.IAsyncEnumerable<TResult>.GetEnumerator()\r\n    System.Linq.AsyncEnumerable.Aggregate[TSource,TAccumulate,TResult](IAsyncEnumerable`1 source, TAccumulate seed, Func`3 accumulator, Func`2 resultSelector, CancellationToken cancellationToken)\r\n    System.Linq.AsyncEnumerable.Aggregate[TSource,TAccumulate](IAsyncEnumerable`1 source, TAccumulate seed, Func`3 accumulator, CancellationToken cancellationToken)\r\n    System.Linq.AsyncEnumerable.ToList[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken)\r\n    System.Linq.QueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)\r\n    System.Linq.QueryableExtensions.ToListAsync[TSource](IQueryable`1 source)\r\n    Microsoft.AspNet.Identity.EntityFramework.UserStore`4.<GetRolesAsync>d__34.MoveNext()\r\n\r\nCalling code in aspnet/Identity\r\n\r\n    var query = from userRole in UserRoles\r\n                     join role in Roles on userRole.RoleId equals role.Id\r\n                     where userRole.UserId.Equals(userId)\r\n                     select role.Name;\r\n         return await query.ToListAsync();"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/98425999","html_url":"https://github.com/aspnet/EntityFramework/issues/1428#issuecomment-98425999","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/1428","id":98425999,"user":{"login":"ExistentialEnso","id":824548,"avatar_url":"https://avatars.githubusercontent.com/u/824548?v=3","gravatar_id":"","url":"https://api.github.com/users/ExistentialEnso","html_url":"https://github.com/ExistentialEnso","followers_url":"https://api.github.com/users/ExistentialEnso/followers","following_url":"https://api.github.com/users/ExistentialEnso/following{/other_user}","gists_url":"https://api.github.com/users/ExistentialEnso/gists{/gist_id}","starred_url":"https://api.github.com/users/ExistentialEnso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExistentialEnso/subscriptions","organizations_url":"https://api.github.com/users/ExistentialEnso/orgs","repos_url":"https://api.github.com/users/ExistentialEnso/repos","events_url":"https://api.github.com/users/ExistentialEnso/events{/privacy}","received_events_url":"https://api.github.com/users/ExistentialEnso/received_events","type":"User","site_admin":false},"created_at":"2015-05-03T01:58:44Z","updated_at":"2015-05-03T01:58:44Z","body":"Just fixed it by adding this to the StructureMap container configuration:\r\n\r\nc.For<IUserStore<ApplicationUser>>().Singleton().Use(new UserStore<ApplicationUser>(new ApplicationDbContext()));"}}