{"action":"created","comment":{"url":"https://api.github.com/repos/shaeredal/test-task/pulls/comments/67718353","id":67718353,"diff_hunk":"@@ -13,9 +15,10 @@ public ProductController(IProductService productService)\n             this.productService = productService;\n         }\n \n-        public void Post(ProductUserViewModel product)\n+        public void Post(ProductViewModel product)\n         {\n-            productService.Add(product.Product, product.UserId);\n+            var userId = ((Principal) RequestContext.Principal).Id;","path":"OnlinerNotifier/OnlinerNotifier.Web/Controllers/ProductController.cs","position":null,"original_position":20,"commit_id":"47ee3eaccaf8d0bfa7f4a2b50f3cf0b86057df99","original_commit_id":"47ee3eaccaf8d0bfa7f4a2b50f3cf0b86057df99","user":{"login":"AndrPetrov","id":3657003,"avatar_url":"https://avatars.githubusercontent.com/u/3657003?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrPetrov","html_url":"https://github.com/AndrPetrov","followers_url":"https://api.github.com/users/AndrPetrov/followers","following_url":"https://api.github.com/users/AndrPetrov/following{/other_user}","gists_url":"https://api.github.com/users/AndrPetrov/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrPetrov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrPetrov/subscriptions","organizations_url":"https://api.github.com/users/AndrPetrov/orgs","repos_url":"https://api.github.com/users/AndrPetrov/repos","events_url":"https://api.github.com/users/AndrPetrov/events{/privacy}","received_events_url":"https://api.github.com/users/AndrPetrov/received_events","type":"User","site_admin":false},"body":"А вот теперь логично сделать базовый класс для контроллера и в нем пропертю уже нужного типа и не нужно будет приводить каждый раз.","created_at":"2016-06-20T16:14:50Z","updated_at":"2016-06-20T16:14:50Z","html_url":"https://github.com/shaeredal/test-task/pull/12#discussion_r67718353","pull_request_url":"https://api.github.com/repos/shaeredal/test-task/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/shaeredal/test-task/pulls/comments/67718353"},"html":{"href":"https://github.com/shaeredal/test-task/pull/12#discussion_r67718353"},"pull_request":{"href":"https://api.github.com/repos/shaeredal/test-task/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/shaeredal/test-task/pulls/12","id":74424658,"html_url":"https://github.com/shaeredal/test-task/pull/12","diff_url":"https://github.com/shaeredal/test-task/pull/12.diff","patch_url":"https://github.com/shaeredal/test-task/pull/12.patch","issue_url":"https://api.github.com/repos/shaeredal/test-task/issues/12","number":12,"state":"open","locked":false,"title":"Getting products backend add.","user":{"login":"shaeredal","id":12098038,"avatar_url":"https://avatars.githubusercontent.com/u/12098038?v=3","gravatar_id":"","url":"https://api.github.com/users/shaeredal","html_url":"https://github.com/shaeredal","followers_url":"https://api.github.com/users/shaeredal/followers","following_url":"https://api.github.com/users/shaeredal/following{/other_user}","gists_url":"https://api.github.com/users/shaeredal/gists{/gist_id}","starred_url":"https://api.github.com/users/shaeredal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaeredal/subscriptions","organizations_url":"https://api.github.com/users/shaeredal/orgs","repos_url":"https://api.github.com/users/shaeredal/repos","events_url":"https://api.github.com/users/shaeredal/events{/privacy}","received_events_url":"https://api.github.com/users/shaeredal/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-20T10:57:21Z","updated_at":"2016-06-20T16:14:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b13c2771b627d9079baf3afd9c05f3cf9f9bd7b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/shaeredal/test-task/pulls/12/commits","review_comments_url":"https://api.github.com/repos/shaeredal/test-task/pulls/12/comments","review_comment_url":"https://api.github.com/repos/shaeredal/test-task/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shaeredal/test-task/issues/12/comments","statuses_url":"https://api.github.com/repos/shaeredal/test-task/statuses/47ee3eaccaf8d0bfa7f4a2b50f3cf0b86057df99","head":{"label":"shaeredal:feature/products_list","ref":"feature/products_list","sha":"47ee3eaccaf8d0bfa7f4a2b50f3cf0b86057df99","user":{"login":"shaeredal","id":12098038,"avatar_url":"https://avatars.githubusercontent.com/u/12098038?v=3","gravatar_id":"","url":"https://api.github.com/users/shaeredal","html_url":"https://github.com/shaeredal","followers_url":"https://api.github.com/users/shaeredal/followers","following_url":"https://api.github.com/users/shaeredal/following{/other_user}","gists_url":"https://api.github.com/users/shaeredal/gists{/gist_id}","starred_url":"https://api.github.com/users/shaeredal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaeredal/subscriptions","organizations_url":"https://api.github.com/users/shaeredal/orgs","repos_url":"https://api.github.com/users/shaeredal/repos","events_url":"https://api.github.com/users/shaeredal/events{/privacy}","received_events_url":"https://api.github.com/users/shaeredal/received_events","type":"User","site_admin":false},"repo":{"id":61029741,"name":"test-task","full_name":"shaeredal/test-task","owner":{"login":"shaeredal","id":12098038,"avatar_url":"https://avatars.githubusercontent.com/u/12098038?v=3","gravatar_id":"","url":"https://api.github.com/users/shaeredal","html_url":"https://github.com/shaeredal","followers_url":"https://api.github.com/users/shaeredal/followers","following_url":"https://api.github.com/users/shaeredal/following{/other_user}","gists_url":"https://api.github.com/users/shaeredal/gists{/gist_id}","starred_url":"https://api.github.com/users/shaeredal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaeredal/subscriptions","organizations_url":"https://api.github.com/users/shaeredal/orgs","repos_url":"https://api.github.com/users/shaeredal/repos","events_url":"https://api.github.com/users/shaeredal/events{/privacy}","received_events_url":"https://api.github.com/users/shaeredal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shaeredal/test-task","description":"","fork":false,"url":"https://api.github.com/repos/shaeredal/test-task","forks_url":"https://api.github.com/repos/shaeredal/test-task/forks","keys_url":"https://api.github.com/repos/shaeredal/test-task/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shaeredal/test-task/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shaeredal/test-task/teams","hooks_url":"https://api.github.com/repos/shaeredal/test-task/hooks","issue_events_url":"https://api.github.com/repos/shaeredal/test-task/issues/events{/number}","events_url":"https://api.github.com/repos/shaeredal/test-task/events","assignees_url":"https://api.github.com/repos/shaeredal/test-task/assignees{/user}","branches_url":"https://api.github.com/repos/shaeredal/test-task/branches{/branch}","tags_url":"https://api.github.com/repos/shaeredal/test-task/tags","blobs_url":"https://api.github.com/repos/shaeredal/test-task/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shaeredal/test-task/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shaeredal/test-task/git/refs{/sha}","trees_url":"https://api.github.com/repos/shaeredal/test-task/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shaeredal/test-task/statuses/{sha}","languages_url":"https://api.github.com/repos/shaeredal/test-task/languages","stargazers_url":"https://api.github.com/repos/shaeredal/test-task/stargazers","contributors_url":"https://api.github.com/repos/shaeredal/test-task/contributors","subscribers_url":"https://api.github.com/repos/shaeredal/test-task/subscribers","subscription_url":"https://api.github.com/repos/shaeredal/test-task/subscription","commits_url":"https://api.github.com/repos/shaeredal/test-task/commits{/sha}","git_commits_url":"https://api.github.com/repos/shaeredal/test-task/git/commits{/sha}","comments_url":"https://api.github.com/repos/shaeredal/test-task/comments{/number}","issue_comment_url":"https://api.github.com/repos/shaeredal/test-task/issues/comments{/number}","contents_url":"https://api.github.com/repos/shaeredal/test-task/contents/{+path}","compare_url":"https://api.github.com/repos/shaeredal/test-task/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shaeredal/test-task/merges","archive_url":"https://api.github.com/repos/shaeredal/test-task/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shaeredal/test-task/downloads","issues_url":"https://api.github.com/repos/shaeredal/test-task/issues{/number}","pulls_url":"https://api.github.com/repos/shaeredal/test-task/pulls{/number}","milestones_url":"https://api.github.com/repos/shaeredal/test-task/milestones{/number}","notifications_url":"https://api.github.com/repos/shaeredal/test-task/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shaeredal/test-task/labels{/name}","releases_url":"https://api.github.com/repos/shaeredal/test-task/releases{/id}","deployments_url":"https://api.github.com/repos/shaeredal/test-task/deployments","created_at":"2016-06-13T11:09:08Z","updated_at":"2016-06-14T10:00:33Z","pushed_at":"2016-06-20T14:31:32Z","git_url":"git://github.com/shaeredal/test-task.git","ssh_url":"git@github.com:shaeredal/test-task.git","clone_url":"https://github.com/shaeredal/test-task.git","svn_url":"https://github.com/shaeredal/test-task","homepage":null,"size":3482,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"shaeredal:develop","ref":"develop","sha":"abf7e3ece5e163bb5ca9b124416a3a07fb1603cc","user":{"login":"shaeredal","id":12098038,"avatar_url":"https://avatars.githubusercontent.com/u/12098038?v=3","gravatar_id":"","url":"https://api.github.com/users/shaeredal","html_url":"https://github.com/shaeredal","followers_url":"https://api.github.com/users/shaeredal/followers","following_url":"https://api.github.com/users/shaeredal/following{/other_user}","gists_url":"https://api.github.com/users/shaeredal/gists{/gist_id}","starred_url":"https://api.github.com/users/shaeredal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaeredal/subscriptions","organizations_url":"https://api.github.com/users/shaeredal/orgs","repos_url":"https://api.github.com/users/shaeredal/repos","events_url":"https://api.github.com/users/shaeredal/events{/privacy}","received_events_url":"https://api.github.com/users/shaeredal/received_events","type":"User","site_admin":false},"repo":{"id":61029741,"name":"test-task","full_name":"shaeredal/test-task","owner":{"login":"shaeredal","id":12098038,"avatar_url":"https://avatars.githubusercontent.com/u/12098038?v=3","gravatar_id":"","url":"https://api.github.com/users/shaeredal","html_url":"https://github.com/shaeredal","followers_url":"https://api.github.com/users/shaeredal/followers","following_url":"https://api.github.com/users/shaeredal/following{/other_user}","gists_url":"https://api.github.com/users/shaeredal/gists{/gist_id}","starred_url":"https://api.github.com/users/shaeredal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaeredal/subscriptions","organizations_url":"https://api.github.com/users/shaeredal/orgs","repos_url":"https://api.github.com/users/shaeredal/repos","events_url":"https://api.github.com/users/shaeredal/events{/privacy}","received_events_url":"https://api.github.com/users/shaeredal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shaeredal/test-task","description":"","fork":false,"url":"https://api.github.com/repos/shaeredal/test-task","forks_url":"https://api.github.com/repos/shaeredal/test-task/forks","keys_url":"https://api.github.com/repos/shaeredal/test-task/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shaeredal/test-task/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shaeredal/test-task/teams","hooks_url":"https://api.github.com/repos/shaeredal/test-task/hooks","issue_events_url":"https://api.github.com/repos/shaeredal/test-task/issues/events{/number}","events_url":"https://api.github.com/repos/shaeredal/test-task/events","assignees_url":"https://api.github.com/repos/shaeredal/test-task/assignees{/user}","branches_url":"https://api.github.com/repos/shaeredal/test-task/branches{/branch}","tags_url":"https://api.github.com/repos/shaeredal/test-task/tags","blobs_url":"https://api.github.com/repos/shaeredal/test-task/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shaeredal/test-task/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shaeredal/test-task/git/refs{/sha}","trees_url":"https://api.github.com/repos/shaeredal/test-task/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shaeredal/test-task/statuses/{sha}","languages_url":"https://api.github.com/repos/shaeredal/test-task/languages","stargazers_url":"https://api.github.com/repos/shaeredal/test-task/stargazers","contributors_url":"https://api.github.com/repos/shaeredal/test-task/contributors","subscribers_url":"https://api.github.com/repos/shaeredal/test-task/subscribers","subscription_url":"https://api.github.com/repos/shaeredal/test-task/subscription","commits_url":"https://api.github.com/repos/shaeredal/test-task/commits{/sha}","git_commits_url":"https://api.github.com/repos/shaeredal/test-task/git/commits{/sha}","comments_url":"https://api.github.com/repos/shaeredal/test-task/comments{/number}","issue_comment_url":"https://api.github.com/repos/shaeredal/test-task/issues/comments{/number}","contents_url":"https://api.github.com/repos/shaeredal/test-task/contents/{+path}","compare_url":"https://api.github.com/repos/shaeredal/test-task/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shaeredal/test-task/merges","archive_url":"https://api.github.com/repos/shaeredal/test-task/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shaeredal/test-task/downloads","issues_url":"https://api.github.com/repos/shaeredal/test-task/issues{/number}","pulls_url":"https://api.github.com/repos/shaeredal/test-task/pulls{/number}","milestones_url":"https://api.github.com/repos/shaeredal/test-task/milestones{/number}","notifications_url":"https://api.github.com/repos/shaeredal/test-task/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shaeredal/test-task/labels{/name}","releases_url":"https://api.github.com/repos/shaeredal/test-task/releases{/id}","deployments_url":"https://api.github.com/repos/shaeredal/test-task/deployments","created_at":"2016-06-13T11:09:08Z","updated_at":"2016-06-14T10:00:33Z","pushed_at":"2016-06-20T14:31:32Z","git_url":"git://github.com/shaeredal/test-task.git","ssh_url":"git@github.com:shaeredal/test-task.git","clone_url":"https://github.com/shaeredal/test-task.git","svn_url":"https://github.com/shaeredal/test-task","homepage":null,"size":3482,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/shaeredal/test-task/pulls/12"},"html":{"href":"https://github.com/shaeredal/test-task/pull/12"},"issue":{"href":"https://api.github.com/repos/shaeredal/test-task/issues/12"},"comments":{"href":"https://api.github.com/repos/shaeredal/test-task/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/shaeredal/test-task/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/shaeredal/test-task/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shaeredal/test-task/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/shaeredal/test-task/statuses/47ee3eaccaf8d0bfa7f4a2b50f3cf0b86057df99"}}}}
{"actor":{"display_login":"AndrPetrov"}}