{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/comments/62212140","id":62212140,"diff_hunk":"@@ -1099,6 +1099,91 @@ public virtual void Where_datetime_utcnow()\n         }\n \n         [ConditionalFact]\n+        public virtual void Where_datetime_date_component()\n+        {\n+            var myDatetime = new DateTime(1998, 5, 4);\n+            AssertQuery<Order>(\n+                oc => oc.Where(o =>\n+                o.OrderDate.Value.Date == myDatetime),\n+                entryCount: 3);\n+        }\n+\n+\n+        [ConditionalFact]\n+        public virtual void Where_datetime_year_component()\n+        {\n+            AssertQuery<Order>(\n+               oc => oc.Where(o =>\n+               o.OrderDate.Value.Year == 1998),\n+               entryCount: 270);\n+        }\n+\n+        [ConditionalFact]\n+        public virtual void Where_datetime_month_component()\n+        {\n+            AssertQuery<Order>(\n+                oc => oc.Where(o =>\n+                o.OrderDate.Value.Month == 4),\n+                entryCount: 105);\n+        }\n+\n+        [ConditionalFact]\n+        public virtual void Where_datetime_dayOfYear_component()\n+        {\n+            AssertQuery<Order>(\n+                oc => oc.Where(o =>\n+                o.OrderDate.Value.DayOfYear == 68),\n+                entryCount: 3);\n+        }\n+\n+\n+        [ConditionalFact]\n+        public virtual void Where_datetime_day_component()\n+        {\n+            AssertQuery<Order>(\n+              oc => oc.Where(o =>\n+              o.OrderDate.Value.Day == 4),\n+              entryCount: 27);\n+        }\n+\n+        [ConditionalFact]\n+        public virtual void Where_datetime_hour_component()\n+        {\n+            AssertQuery<Order>(\n+              oc => oc.Where(o =>\n+              o.OrderDate.Value.Hour == 14),\n+              entryCount: 0);","path":"src/Microsoft.EntityFrameworkCore.Specification.Tests/QueryTestBase.cs","position":57,"original_position":57,"commit_id":"43e9114037b2094ad7370689b6f29073c5e3b880","original_commit_id":"43e9114037b2094ad7370689b6f29073c5e3b880","user":{"login":"anpete","id":1210944,"avatar_url":"https://avatars.githubusercontent.com/u/1210944?v=3","gravatar_id":"","url":"https://api.github.com/users/anpete","html_url":"https://github.com/anpete","followers_url":"https://api.github.com/users/anpete/followers","following_url":"https://api.github.com/users/anpete/following{/other_user}","gists_url":"https://api.github.com/users/anpete/gists{/gist_id}","starred_url":"https://api.github.com/users/anpete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anpete/subscriptions","organizations_url":"https://api.github.com/users/anpete/orgs","repos_url":"https://api.github.com/users/anpete/repos","events_url":"https://api.github.com/users/anpete/events{/privacy}","received_events_url":"https://api.github.com/users/anpete/received_events","type":"User","site_admin":false},"body":"No results.","created_at":"2016-05-05T16:22:14Z","updated_at":"2016-05-05T16:22:14Z","html_url":"https://github.com/aspnet/EntityFramework/pull/5270#discussion_r62212140","pull_request_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/5270","_links":{"self":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/comments/62212140"},"html":{"href":"https://github.com/aspnet/EntityFramework/pull/5270#discussion_r62212140"},"pull_request":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/5270"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/5270","id":69014836,"html_url":"https://github.com/aspnet/EntityFramework/pull/5270","diff_url":"https://github.com/aspnet/EntityFramework/pull/5270.diff","patch_url":"https://github.com/aspnet/EntityFramework/pull/5270.patch","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5270","number":5270,"state":"open","locked":false,"title":"SQL Server datepart translation support (fixes #4582)","user":{"login":"davidroth","id":338856,"avatar_url":"https://avatars.githubusercontent.com/u/338856?v=3","gravatar_id":"","url":"https://api.github.com/users/davidroth","html_url":"https://github.com/davidroth","followers_url":"https://api.github.com/users/davidroth/followers","following_url":"https://api.github.com/users/davidroth/following{/other_user}","gists_url":"https://api.github.com/users/davidroth/gists{/gist_id}","starred_url":"https://api.github.com/users/davidroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidroth/subscriptions","organizations_url":"https://api.github.com/users/davidroth/orgs","repos_url":"https://api.github.com/users/davidroth/repos","events_url":"https://api.github.com/users/davidroth/events{/privacy}","received_events_url":"https://api.github.com/users/davidroth/received_events","type":"User","site_admin":false},"body":"This PR adds sql server translation support for the following DateTime properties in LINQ (See also: https://github.com/aspnet/EntityFramework/issues/4582):\r\n- DateTime.Date\r\n- DateTime.Year\r\n- DateTime.Month\r\n- DateTime.Day\r\n- DateTime.DayOfYear\r\n- DateTime.Day\r\n- DateTime.Hour\r\n- DateTime.Minute\r\n- DateTime.Second\r\n- DateTime.Millisecond\r\n\r\nThis is SQL server only atm, but I would also be willing to add support for sqlite. \r\nHowever, I thought I would gather some feedback on this part first.\r\n\r\nLooking forward to your feedback :)\r\n\r\n","created_at":"2016-05-05T14:31:35Z","updated_at":"2016-05-05T16:22:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e234865f8696a87de7d57cc39a9b550c21469e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/5270/commits","review_comments_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/5270/comments","review_comment_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5270/comments","statuses_url":"https://api.github.com/repos/aspnet/EntityFramework/statuses/43e9114037b2094ad7370689b6f29073c5e3b880","head":{"label":"davidroth:datetime_component_translation","ref":"datetime_component_translation","sha":"43e9114037b2094ad7370689b6f29073c5e3b880","user":{"login":"davidroth","id":338856,"avatar_url":"https://avatars.githubusercontent.com/u/338856?v=3","gravatar_id":"","url":"https://api.github.com/users/davidroth","html_url":"https://github.com/davidroth","followers_url":"https://api.github.com/users/davidroth/followers","following_url":"https://api.github.com/users/davidroth/following{/other_user}","gists_url":"https://api.github.com/users/davidroth/gists{/gist_id}","starred_url":"https://api.github.com/users/davidroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidroth/subscriptions","organizations_url":"https://api.github.com/users/davidroth/orgs","repos_url":"https://api.github.com/users/davidroth/repos","events_url":"https://api.github.com/users/davidroth/events{/privacy}","received_events_url":"https://api.github.com/users/davidroth/received_events","type":"User","site_admin":false},"repo":{"id":51074293,"name":"EntityFrameworkCore","full_name":"davidroth/EntityFrameworkCore","owner":{"login":"davidroth","id":338856,"avatar_url":"https://avatars.githubusercontent.com/u/338856?v=3","gravatar_id":"","url":"https://api.github.com/users/davidroth","html_url":"https://github.com/davidroth","followers_url":"https://api.github.com/users/davidroth/followers","following_url":"https://api.github.com/users/davidroth/following{/other_user}","gists_url":"https://api.github.com/users/davidroth/gists{/gist_id}","starred_url":"https://api.github.com/users/davidroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidroth/subscriptions","organizations_url":"https://api.github.com/users/davidroth/orgs","repos_url":"https://api.github.com/users/davidroth/repos","events_url":"https://api.github.com/users/davidroth/events{/privacy}","received_events_url":"https://api.github.com/users/davidroth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidroth/EntityFrameworkCore","description":"Microsoft's recommended data access technology for new applications in .NET.","fork":true,"url":"https://api.github.com/repos/davidroth/EntityFrameworkCore","forks_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/forks","keys_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/teams","hooks_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/hooks","issue_events_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/issues/events{/number}","events_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/events","assignees_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/assignees{/user}","branches_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/branches{/branch}","tags_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/tags","blobs_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/statuses/{sha}","languages_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/languages","stargazers_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/stargazers","contributors_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/contributors","subscribers_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/subscribers","subscription_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/subscription","commits_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/contents/{+path}","compare_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/merges","archive_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/downloads","issues_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/issues{/number}","pulls_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/pulls{/number}","milestones_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/milestones{/number}","notifications_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/labels{/name}","releases_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/releases{/id}","deployments_url":"https://api.github.com/repos/davidroth/EntityFrameworkCore/deployments","created_at":"2016-02-04T12:21:39Z","updated_at":"2016-02-04T12:23:33Z","pushed_at":"2016-05-05T14:23:39Z","git_url":"git://github.com/davidroth/EntityFrameworkCore.git","ssh_url":"git@github.com:davidroth/EntityFrameworkCore.git","clone_url":"https://github.com/davidroth/EntityFrameworkCore.git","svn_url":"https://github.com/davidroth/EntityFrameworkCore","homepage":"","size":35032,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"b866cf5ee84943e06837848c09cd679c438c50ad","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":16157746,"name":"EntityFramework","full_name":"aspnet/EntityFramework","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/EntityFramework","description":"Microsoft's recommended data access technology for new applications in .NET.","fork":false,"url":"https://api.github.com/repos/aspnet/EntityFramework","forks_url":"https://api.github.com/repos/aspnet/EntityFramework/forks","keys_url":"https://api.github.com/repos/aspnet/EntityFramework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/EntityFramework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/EntityFramework/teams","hooks_url":"https://api.github.com/repos/aspnet/EntityFramework/hooks","issue_events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/EntityFramework/events","assignees_url":"https://api.github.com/repos/aspnet/EntityFramework/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/EntityFramework/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/EntityFramework/tags","blobs_url":"https://api.github.com/repos/aspnet/EntityFramework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/EntityFramework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/EntityFramework/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/EntityFramework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/EntityFramework/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/EntityFramework/languages","stargazers_url":"https://api.github.com/repos/aspnet/EntityFramework/stargazers","contributors_url":"https://api.github.com/repos/aspnet/EntityFramework/contributors","subscribers_url":"https://api.github.com/repos/aspnet/EntityFramework/subscribers","subscription_url":"https://api.github.com/repos/aspnet/EntityFramework/subscription","commits_url":"https://api.github.com/repos/aspnet/EntityFramework/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/EntityFramework/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/EntityFramework/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/EntityFramework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/EntityFramework/merges","archive_url":"https://api.github.com/repos/aspnet/EntityFramework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/EntityFramework/downloads","issues_url":"https://api.github.com/repos/aspnet/EntityFramework/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/EntityFramework/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/EntityFramework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/EntityFramework/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/EntityFramework/deployments","created_at":"2014-01-23T00:52:01Z","updated_at":"2016-05-05T11:18:26Z","pushed_at":"2016-05-05T16:16:12Z","git_url":"git://github.com/aspnet/EntityFramework.git","ssh_url":"git@github.com:aspnet/EntityFramework.git","clone_url":"https://github.com/aspnet/EntityFramework.git","svn_url":"https://github.com/aspnet/EntityFramework","homepage":"","size":50183,"stargazers_count":3220,"watchers_count":3220,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":980,"mirror_url":null,"open_issues_count":546,"forks":980,"open_issues":546,"watchers":3220,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/5270"},"html":{"href":"https://github.com/aspnet/EntityFramework/pull/5270"},"issue":{"href":"https://api.github.com/repos/aspnet/EntityFramework/issues/5270"},"comments":{"href":"https://api.github.com/repos/aspnet/EntityFramework/issues/5270/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/5270/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/5270/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/EntityFramework/statuses/43e9114037b2094ad7370689b6f29073c5e3b880"}}}}