{"action":"closed","number":563,"pull_request":{"url":"https://api.github.com/repos/voat/voat/pulls/563","id":38760197,"html_url":"https://github.com/voat/voat/pull/563","diff_url":"https://github.com/voat/voat/pull/563.diff","patch_url":"https://github.com/voat/voat/pull/563.patch","issue_url":"https://api.github.com/repos/voat/voat/issues/563","number":563,"state":"closed","locked":false,"title":"EntityFramework refactoring and database access changes","user":{"login":"pcwiek","id":1394568,"avatar_url":"https://avatars.githubusercontent.com/u/1394568?v=3","gravatar_id":"","url":"https://api.github.com/users/pcwiek","html_url":"https://github.com/pcwiek","followers_url":"https://api.github.com/users/pcwiek/followers","following_url":"https://api.github.com/users/pcwiek/following{/other_user}","gists_url":"https://api.github.com/users/pcwiek/gists{/gist_id}","starred_url":"https://api.github.com/users/pcwiek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcwiek/subscriptions","organizations_url":"https://api.github.com/users/pcwiek/orgs","repos_url":"https://api.github.com/users/pcwiek/repos","events_url":"https://api.github.com/users/pcwiek/events{/privacy}","received_events_url":"https://api.github.com/users/pcwiek/received_events","type":"User","site_admin":false},"body":"This is a big one...\r\n\r\nIt's still a work in progress, but most of the queries and commands have been separated into their respective namespaces (CQS).\r\n\r\nIt also includes #488 because I had to have a 'safety net' of sorts when rewriting the queries. At least I'm *moderately* sure they work as expected, or at least as tests outline the functionality should work.\r\n\r\nThere are schema changes included in one of the commits to include three views - it's easy to query them and it should provide measurable performance improvement for #464 \r\n\r\nMost queries have been rewritten to avoid excessive database chatter.\r\n\r\nI specifically rolled back any changes that affected controllers - those queries are not used in the application right now, they're just 'there'. I thought it might be easier to gradually migrate from old database access towards new, especially since there's a lot of untangling left to be done in models, controllers and views.\r\n\r\nPlease review it and let me know what you think. Discussion is, as always, welcome!","created_at":"2015-06-29T10:28:15Z","updated_at":"2015-09-09T05:07:39Z","closed_at":"2015-09-09T05:07:39Z","merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/voat/voat/pulls/563/commits","review_comments_url":"https://api.github.com/repos/voat/voat/pulls/563/comments","review_comment_url":"https://api.github.com/repos/voat/voat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/voat/voat/issues/563/comments","statuses_url":"https://api.github.com/repos/voat/voat/statuses/344fb74e16ab9f5046372539bbafdceaa5f0eafc","head":{"label":"pcwiek:ef-changes","ref":"ef-changes","sha":"344fb74e16ab9f5046372539bbafdceaa5f0eafc","user":{"login":"pcwiek","id":1394568,"avatar_url":"https://avatars.githubusercontent.com/u/1394568?v=3","gravatar_id":"","url":"https://api.github.com/users/pcwiek","html_url":"https://github.com/pcwiek","followers_url":"https://api.github.com/users/pcwiek/followers","following_url":"https://api.github.com/users/pcwiek/following{/other_user}","gists_url":"https://api.github.com/users/pcwiek/gists{/gist_id}","starred_url":"https://api.github.com/users/pcwiek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcwiek/subscriptions","organizations_url":"https://api.github.com/users/pcwiek/orgs","repos_url":"https://api.github.com/users/pcwiek/repos","events_url":"https://api.github.com/users/pcwiek/events{/privacy}","received_events_url":"https://api.github.com/users/pcwiek/received_events","type":"User","site_admin":false},"repo":{"id":37453615,"name":"voat","full_name":"pcwiek/voat","owner":{"login":"pcwiek","id":1394568,"avatar_url":"https://avatars.githubusercontent.com/u/1394568?v=3","gravatar_id":"","url":"https://api.github.com/users/pcwiek","html_url":"https://github.com/pcwiek","followers_url":"https://api.github.com/users/pcwiek/followers","following_url":"https://api.github.com/users/pcwiek/following{/other_user}","gists_url":"https://api.github.com/users/pcwiek/gists{/gist_id}","starred_url":"https://api.github.com/users/pcwiek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcwiek/subscriptions","organizations_url":"https://api.github.com/users/pcwiek/orgs","repos_url":"https://api.github.com/users/pcwiek/repos","events_url":"https://api.github.com/users/pcwiek/events{/privacy}","received_events_url":"https://api.github.com/users/pcwiek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pcwiek/voat","description":"The code that powers Voat","fork":true,"url":"https://api.github.com/repos/pcwiek/voat","forks_url":"https://api.github.com/repos/pcwiek/voat/forks","keys_url":"https://api.github.com/repos/pcwiek/voat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pcwiek/voat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pcwiek/voat/teams","hooks_url":"https://api.github.com/repos/pcwiek/voat/hooks","issue_events_url":"https://api.github.com/repos/pcwiek/voat/issues/events{/number}","events_url":"https://api.github.com/repos/pcwiek/voat/events","assignees_url":"https://api.github.com/repos/pcwiek/voat/assignees{/user}","branches_url":"https://api.github.com/repos/pcwiek/voat/branches{/branch}","tags_url":"https://api.github.com/repos/pcwiek/voat/tags","blobs_url":"https://api.github.com/repos/pcwiek/voat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pcwiek/voat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pcwiek/voat/git/refs{/sha}","trees_url":"https://api.github.com/repos/pcwiek/voat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pcwiek/voat/statuses/{sha}","languages_url":"https://api.github.com/repos/pcwiek/voat/languages","stargazers_url":"https://api.github.com/repos/pcwiek/voat/stargazers","contributors_url":"https://api.github.com/repos/pcwiek/voat/contributors","subscribers_url":"https://api.github.com/repos/pcwiek/voat/subscribers","subscription_url":"https://api.github.com/repos/pcwiek/voat/subscription","commits_url":"https://api.github.com/repos/pcwiek/voat/commits{/sha}","git_commits_url":"https://api.github.com/repos/pcwiek/voat/git/commits{/sha}","comments_url":"https://api.github.com/repos/pcwiek/voat/comments{/number}","issue_comment_url":"https://api.github.com/repos/pcwiek/voat/issues/comments{/number}","contents_url":"https://api.github.com/repos/pcwiek/voat/contents/{+path}","compare_url":"https://api.github.com/repos/pcwiek/voat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pcwiek/voat/merges","archive_url":"https://api.github.com/repos/pcwiek/voat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pcwiek/voat/downloads","issues_url":"https://api.github.com/repos/pcwiek/voat/issues{/number}","pulls_url":"https://api.github.com/repos/pcwiek/voat/pulls{/number}","milestones_url":"https://api.github.com/repos/pcwiek/voat/milestones{/number}","notifications_url":"https://api.github.com/repos/pcwiek/voat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pcwiek/voat/labels{/name}","releases_url":"https://api.github.com/repos/pcwiek/voat/releases{/id}","created_at":"2015-06-15T08:44:34Z","updated_at":"2015-06-15T08:44:36Z","pushed_at":"2015-07-01T11:02:24Z","git_url":"git://github.com/pcwiek/voat.git","ssh_url":"git@github.com:pcwiek/voat.git","clone_url":"https://github.com/pcwiek/voat.git","svn_url":"https://github.com/pcwiek/voat","homepage":"https://voat.co","size":22076,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"voat:master","ref":"master","sha":"c364168ecf0498abe1e8225f27eb30f625a0f1db","user":{"login":"voat","id":3072753,"avatar_url":"https://avatars.githubusercontent.com/u/3072753?v=3","gravatar_id":"","url":"https://api.github.com/users/voat","html_url":"https://github.com/voat","followers_url":"https://api.github.com/users/voat/followers","following_url":"https://api.github.com/users/voat/following{/other_user}","gists_url":"https://api.github.com/users/voat/gists{/gist_id}","starred_url":"https://api.github.com/users/voat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voat/subscriptions","organizations_url":"https://api.github.com/users/voat/orgs","repos_url":"https://api.github.com/users/voat/repos","events_url":"https://api.github.com/users/voat/events{/privacy}","received_events_url":"https://api.github.com/users/voat/received_events","type":"User","site_admin":false},"repo":{"id":18642969,"name":"voat","full_name":"voat/voat","owner":{"login":"voat","id":3072753,"avatar_url":"https://avatars.githubusercontent.com/u/3072753?v=3","gravatar_id":"","url":"https://api.github.com/users/voat","html_url":"https://github.com/voat","followers_url":"https://api.github.com/users/voat/followers","following_url":"https://api.github.com/users/voat/following{/other_user}","gists_url":"https://api.github.com/users/voat/gists{/gist_id}","starred_url":"https://api.github.com/users/voat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voat/subscriptions","organizations_url":"https://api.github.com/users/voat/orgs","repos_url":"https://api.github.com/users/voat/repos","events_url":"https://api.github.com/users/voat/events{/privacy}","received_events_url":"https://api.github.com/users/voat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/voat/voat","description":"The code that powers Voat","fork":false,"url":"https://api.github.com/repos/voat/voat","forks_url":"https://api.github.com/repos/voat/voat/forks","keys_url":"https://api.github.com/repos/voat/voat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/voat/voat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/voat/voat/teams","hooks_url":"https://api.github.com/repos/voat/voat/hooks","issue_events_url":"https://api.github.com/repos/voat/voat/issues/events{/number}","events_url":"https://api.github.com/repos/voat/voat/events","assignees_url":"https://api.github.com/repos/voat/voat/assignees{/user}","branches_url":"https://api.github.com/repos/voat/voat/branches{/branch}","tags_url":"https://api.github.com/repos/voat/voat/tags","blobs_url":"https://api.github.com/repos/voat/voat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/voat/voat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/voat/voat/git/refs{/sha}","trees_url":"https://api.github.com/repos/voat/voat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/voat/voat/statuses/{sha}","languages_url":"https://api.github.com/repos/voat/voat/languages","stargazers_url":"https://api.github.com/repos/voat/voat/stargazers","contributors_url":"https://api.github.com/repos/voat/voat/contributors","subscribers_url":"https://api.github.com/repos/voat/voat/subscribers","subscription_url":"https://api.github.com/repos/voat/voat/subscription","commits_url":"https://api.github.com/repos/voat/voat/commits{/sha}","git_commits_url":"https://api.github.com/repos/voat/voat/git/commits{/sha}","comments_url":"https://api.github.com/repos/voat/voat/comments{/number}","issue_comment_url":"https://api.github.com/repos/voat/voat/issues/comments{/number}","contents_url":"https://api.github.com/repos/voat/voat/contents/{+path}","compare_url":"https://api.github.com/repos/voat/voat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/voat/voat/merges","archive_url":"https://api.github.com/repos/voat/voat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/voat/voat/downloads","issues_url":"https://api.github.com/repos/voat/voat/issues{/number}","pulls_url":"https://api.github.com/repos/voat/voat/pulls{/number}","milestones_url":"https://api.github.com/repos/voat/voat/milestones{/number}","notifications_url":"https://api.github.com/repos/voat/voat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/voat/voat/labels{/name}","releases_url":"https://api.github.com/repos/voat/voat/releases{/id}","created_at":"2014-04-10T16:11:25Z","updated_at":"2015-09-07T18:40:13Z","pushed_at":"2015-09-05T16:19:20Z","git_url":"git://github.com/voat/voat.git","ssh_url":"git@github.com:voat/voat.git","clone_url":"https://github.com/voat/voat.git","svn_url":"https://github.com/voat/voat","homepage":"https://voat.co","size":26913,"stargazers_count":913,"watchers_count":913,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":280,"mirror_url":null,"open_issues_count":257,"forks":280,"open_issues":257,"watchers":913,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/voat/voat/pulls/563"},"html":{"href":"https://github.com/voat/voat/pull/563"},"issue":{"href":"https://api.github.com/repos/voat/voat/issues/563"},"comments":{"href":"https://api.github.com/repos/voat/voat/issues/563/comments"},"review_comments":{"href":"https://api.github.com/repos/voat/voat/pulls/563/comments"},"review_comment":{"href":"https://api.github.com/repos/voat/voat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/voat/voat/pulls/563/commits"},"statuses":{"href":"https://api.github.com/repos/voat/voat/statuses/344fb74e16ab9f5046372539bbafdceaa5f0eafc"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":3,"review_comments":0,"commits":28,"additions":8894,"deletions":395,"changed_files":116}}