{"action":"closed","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6477","repository_url":"https://api.github.com/repos/aspnet/EntityFramework","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6477/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6477/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6477/events","html_url":"https://github.com/aspnet/EntityFramework/issues/6477","id":175146568,"number":6477,"title":"Simple where clause in Referenced Entity not emmitted","user":{"login":"chrisaut","id":8252355,"avatar_url":"https://avatars.githubusercontent.com/u/8252355?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisaut","html_url":"https://github.com/chrisaut","followers_url":"https://api.github.com/users/chrisaut/followers","following_url":"https://api.github.com/users/chrisaut/following{/other_user}","gists_url":"https://api.github.com/users/chrisaut/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisaut/subscriptions","organizations_url":"https://api.github.com/users/chrisaut/orgs","repos_url":"https://api.github.com/users/chrisaut/repos","events_url":"https://api.github.com/users/chrisaut/events{/privacy}","received_events_url":"https://api.github.com/users/chrisaut/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-06T02:10:43Z","updated_at":"2016-09-06T06:29:03Z","closed_at":"2016-09-06T06:29:03Z","body":"I have a simple Model\r\n```C#\r\n    public class Blog\r\n    {\r\n        public int Id { get; set; }\r\n        public string Name { get; set; }\r\n        public IList<Article> Articles { get; set; }    \r\n    }\r\n\r\n    public class Article\r\n    {\r\n        public int Id { get; set; }\r\n        public Blog Blog { get; set; }\r\n\t// more properties\r\n    }\r\n\r\n    public class BlogDbContext : DbContext\r\n    {\r\n        public DbSet<Blog> Blogs { get; set; }\r\n        public DbSet<Article> Articles { get; set; }\r\n        public DbSet<Author> Authors { get; set; }\r\n\r\n        public BlogDbContext(DbContextOptions options) : base(options)\r\n        {\r\n        }\r\n   }\r\n```\r\n\r\nWhen I do a simple query for all articles in a blog by name, like\r\n```C#\r\ndbContext.Articles.Where(b => b.Blog.Name == blogName).ToList();\r\n```\r\nthe emmitted SQL does not include the condition.\r\n```SQL\r\nSELECT [a].[Id], [a].[AuthorId], [a].[BlogId], [a].[Content], [a].[CreateDate], [a].[ModifiedDate], [a].[PublishDate], [a].[Tags], [a].[Title], [a.Blog].[Id], [a.Blog].[Name]\r\nFROM [Articles] AS [a]\r\nLEFT JOIN [Blogs] AS [a.Blog] ON [a].[BlogId] = [a.Blog].[Id]\r\nORDER BY [a].[BlogId]\r\n```\r\nInstead it seems to do it in memory (result is still correct).\r\n\r\nIs this a known limitation or am I doing something wrong?\r\n\r\n\r\n### Further technical details\r\n\r\nEF Core version: (found in project.json or packages.config) \"Microsoft.EntityFrameworkCore.SqlServer\": \"1.0.0\",\r\nOperating system: Win10 x64 14393\r\nVisual Studio version: VS2015 Pro Update 3"}}
{"actor":{"display_login":"chrisaut"}}