{"action":"created","comment":{"url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/pulls/comments/93221449","pull_request_review_id":13742927,"id":93221449,"diff_hunk":"@@ -11,10 +12,36 @@ public static void Configure()\n         {\n             Mapper.Initialize(config =>\n             {\n-                config.CreateMap<Result, KeyValuePair<string, int>>()\n-                .ConstructUsing(x => new KeyValuePair<string, int>(x.Team.Name, x.Score));\n-\n-                config.CreateMap<SportEvent, SportEventDto>();\n+                // Конфигурация отображения SportEvent на SportEventDto\n+                config.CreateMap<SportEvent, SportEventDto>()\n+                .ForMember(\n+                    e => e.TeamFirst,\n+                    opt => opt.MapFrom(\n+                        s => s.Results.ElementAt(0).Team.Name))\n+                .ForMember(\n+                    e => e.TeamFirstId,\n+                    opt => opt.MapFrom(\n+                        s => s.Results.ElementAt(0).Team.Id))\n+                .ForMember(\n+                    e => e.ScoreFirst,\n+                    opt => opt.MapFrom(\n+                        s => s.Results.ElementAt(0).Score))\n+                .ForMember(\n+                    e => e.TeamSecond,\n+                    opt => opt.MapFrom(\n+                        s => s.Results.ElementAt(1).Team.Name))\n+                .ForMember(\n+                    e => e.TeamSecondId,\n+                    opt => opt.MapFrom(\n+                        s => s.Results.ElementAt(1).Team.Id))\n+                .ForMember(\n+                    e => e.ScoreSecond,\n+                    opt => opt.MapFrom(\n+                        s => s.Results.ElementAt(1).Score))\n+                .ForMember(\n+                    e => e.Date,\n+                    opt => opt.MapFrom(\n+                        s => s.Date.ToShortDateString()));","path":"JinnSports.WEB/App_Start/AutoMapperConfiguration.cs","position":45,"original_position":45,"commit_id":"55e4297302b3b7c3efadea5e47b2ff612bb2262e","original_commit_id":"55e4297302b3b7c3efadea5e47b2ff612bb2262e","user":{"login":"NikitaMagda","id":23454837,"avatar_url":"https://avatars.githubusercontent.com/u/23454837?v=3","gravatar_id":"","url":"https://api.github.com/users/NikitaMagda","html_url":"https://github.com/NikitaMagda","followers_url":"https://api.github.com/users/NikitaMagda/followers","following_url":"https://api.github.com/users/NikitaMagda/following{/other_user}","gists_url":"https://api.github.com/users/NikitaMagda/gists{/gist_id}","starred_url":"https://api.github.com/users/NikitaMagda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikitaMagda/subscriptions","organizations_url":"https://api.github.com/users/NikitaMagda/orgs","repos_url":"https://api.github.com/users/NikitaMagda/repos","events_url":"https://api.github.com/users/NikitaMagda/events{/privacy}","received_events_url":"https://api.github.com/users/NikitaMagda/received_events","type":"User","site_admin":false},"body":"If we have two items with same properties, shouldn't we create class for them? It will simplify mapping structure to \"Map Result[0] to newTeam1, map Result[1] to newTeam2, Map Date to date\" (smth like that) ","created_at":"2016-12-20T11:46:07Z","updated_at":"2016-12-20T11:46:07Z","html_url":"https://github.com/SoftServe-KhNET/JinnSports/pull/82#discussion_r93221449","pull_request_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/pulls/82","_links":{"self":{"href":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/pulls/comments/93221449"},"html":{"href":"https://github.com/SoftServe-KhNET/JinnSports/pull/82#discussion_r93221449"},"pull_request":{"href":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/pulls/82"}}},"pull_request":{"url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/pulls/82","id":98731948,"html_url":"https://github.com/SoftServe-KhNET/JinnSports/pull/82","diff_url":"https://github.com/SoftServe-KhNET/JinnSports/pull/82.diff","patch_url":"https://github.com/SoftServe-KhNET/JinnSports/pull/82.patch","issue_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/issues/82","number":82,"state":"open","locked":false,"title":"Results view","user":{"login":"YatsenkoOleksandr","id":23454841,"avatar_url":"https://avatars.githubusercontent.com/u/23454841?v=3","gravatar_id":"","url":"https://api.github.com/users/YatsenkoOleksandr","html_url":"https://github.com/YatsenkoOleksandr","followers_url":"https://api.github.com/users/YatsenkoOleksandr/followers","following_url":"https://api.github.com/users/YatsenkoOleksandr/following{/other_user}","gists_url":"https://api.github.com/users/YatsenkoOleksandr/gists{/gist_id}","starred_url":"https://api.github.com/users/YatsenkoOleksandr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YatsenkoOleksandr/subscriptions","organizations_url":"https://api.github.com/users/YatsenkoOleksandr/orgs","repos_url":"https://api.github.com/users/YatsenkoOleksandr/repos","events_url":"https://api.github.com/users/YatsenkoOleksandr/events{/privacy}","received_events_url":"https://api.github.com/users/YatsenkoOleksandr/received_events","type":"User","site_admin":false},"body":"#KHNET-79\r\nAdded view, which show sorted by date results.\r\nTo release this IRepository was changed.","created_at":"2016-12-20T11:31:55Z","updated_at":"2016-12-20T11:46:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6d16d21794462de2108643937999845d3e2a40e0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/pulls/82/commits","review_comments_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/pulls/82/comments","review_comment_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/issues/82/comments","statuses_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/statuses/55e4297302b3b7c3efadea5e47b2ff612bb2262e","head":{"label":"YatsenkoOleksandr:results_view","ref":"results_view","sha":"55e4297302b3b7c3efadea5e47b2ff612bb2262e","user":{"login":"YatsenkoOleksandr","id":23454841,"avatar_url":"https://avatars.githubusercontent.com/u/23454841?v=3","gravatar_id":"","url":"https://api.github.com/users/YatsenkoOleksandr","html_url":"https://github.com/YatsenkoOleksandr","followers_url":"https://api.github.com/users/YatsenkoOleksandr/followers","following_url":"https://api.github.com/users/YatsenkoOleksandr/following{/other_user}","gists_url":"https://api.github.com/users/YatsenkoOleksandr/gists{/gist_id}","starred_url":"https://api.github.com/users/YatsenkoOleksandr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YatsenkoOleksandr/subscriptions","organizations_url":"https://api.github.com/users/YatsenkoOleksandr/orgs","repos_url":"https://api.github.com/users/YatsenkoOleksandr/repos","events_url":"https://api.github.com/users/YatsenkoOleksandr/events{/privacy}","received_events_url":"https://api.github.com/users/YatsenkoOleksandr/received_events","type":"User","site_admin":false},"repo":{"id":74262657,"name":"JinnSports","full_name":"YatsenkoOleksandr/JinnSports","owner":{"login":"YatsenkoOleksandr","id":23454841,"avatar_url":"https://avatars.githubusercontent.com/u/23454841?v=3","gravatar_id":"","url":"https://api.github.com/users/YatsenkoOleksandr","html_url":"https://github.com/YatsenkoOleksandr","followers_url":"https://api.github.com/users/YatsenkoOleksandr/followers","following_url":"https://api.github.com/users/YatsenkoOleksandr/following{/other_user}","gists_url":"https://api.github.com/users/YatsenkoOleksandr/gists{/gist_id}","starred_url":"https://api.github.com/users/YatsenkoOleksandr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YatsenkoOleksandr/subscriptions","organizations_url":"https://api.github.com/users/YatsenkoOleksandr/orgs","repos_url":"https://api.github.com/users/YatsenkoOleksandr/repos","events_url":"https://api.github.com/users/YatsenkoOleksandr/events{/privacy}","received_events_url":"https://api.github.com/users/YatsenkoOleksandr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/YatsenkoOleksandr/JinnSports","description":"Sports Portal \"Jinn Sports\"","fork":true,"url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports","forks_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/forks","keys_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/keys{/key_id}","collaborators_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/teams","hooks_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/hooks","issue_events_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/issues/events{/number}","events_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/events","assignees_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/assignees{/user}","branches_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/branches{/branch}","tags_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/tags","blobs_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/git/refs{/sha}","trees_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/git/trees{/sha}","statuses_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/statuses/{sha}","languages_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/languages","stargazers_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/stargazers","contributors_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/contributors","subscribers_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/subscribers","subscription_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/subscription","commits_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/commits{/sha}","git_commits_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/git/commits{/sha}","comments_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/comments{/number}","issue_comment_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/issues/comments{/number}","contents_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/contents/{+path}","compare_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/compare/{base}...{head}","merges_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/merges","archive_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/downloads","issues_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/issues{/number}","pulls_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/pulls{/number}","milestones_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/milestones{/number}","notifications_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/labels{/name}","releases_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/releases{/id}","deployments_url":"https://api.github.com/repos/YatsenkoOleksandr/JinnSports/deployments","created_at":"2016-11-20T08:51:11Z","updated_at":"2016-11-18T16:14:21Z","pushed_at":"2016-12-20T11:14:30Z","git_url":"git://github.com/YatsenkoOleksandr/JinnSports.git","ssh_url":"git@github.com:YatsenkoOleksandr/JinnSports.git","clone_url":"https://github.com/YatsenkoOleksandr/JinnSports.git","svn_url":"https://github.com/YatsenkoOleksandr/JinnSports","homepage":null,"size":51158,"stargazers_count":0,"watchers_count":0,"language":null,"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":"master"}},"base":{"label":"SoftServe-KhNET:developing","ref":"developing","sha":"5c40f36b0ad2f0b6a3a753efbdfa304dc57009ac","user":{"login":"SoftServe-KhNET","id":23558227,"avatar_url":"https://avatars.githubusercontent.com/u/23558227?v=3","gravatar_id":"","url":"https://api.github.com/users/SoftServe-KhNET","html_url":"https://github.com/SoftServe-KhNET","followers_url":"https://api.github.com/users/SoftServe-KhNET/followers","following_url":"https://api.github.com/users/SoftServe-KhNET/following{/other_user}","gists_url":"https://api.github.com/users/SoftServe-KhNET/gists{/gist_id}","starred_url":"https://api.github.com/users/SoftServe-KhNET/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SoftServe-KhNET/subscriptions","organizations_url":"https://api.github.com/users/SoftServe-KhNET/orgs","repos_url":"https://api.github.com/users/SoftServe-KhNET/repos","events_url":"https://api.github.com/users/SoftServe-KhNET/events{/privacy}","received_events_url":"https://api.github.com/users/SoftServe-KhNET/received_events","type":"User","site_admin":false},"repo":{"id":74145965,"name":"JinnSports","full_name":"SoftServe-KhNET/JinnSports","owner":{"login":"SoftServe-KhNET","id":23558227,"avatar_url":"https://avatars.githubusercontent.com/u/23558227?v=3","gravatar_id":"","url":"https://api.github.com/users/SoftServe-KhNET","html_url":"https://github.com/SoftServe-KhNET","followers_url":"https://api.github.com/users/SoftServe-KhNET/followers","following_url":"https://api.github.com/users/SoftServe-KhNET/following{/other_user}","gists_url":"https://api.github.com/users/SoftServe-KhNET/gists{/gist_id}","starred_url":"https://api.github.com/users/SoftServe-KhNET/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SoftServe-KhNET/subscriptions","organizations_url":"https://api.github.com/users/SoftServe-KhNET/orgs","repos_url":"https://api.github.com/users/SoftServe-KhNET/repos","events_url":"https://api.github.com/users/SoftServe-KhNET/events{/privacy}","received_events_url":"https://api.github.com/users/SoftServe-KhNET/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SoftServe-KhNET/JinnSports","description":"Sports Portal \"Jinn Sports\"","fork":false,"url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports","forks_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/forks","keys_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/teams","hooks_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/hooks","issue_events_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/issues/events{/number}","events_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/events","assignees_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/assignees{/user}","branches_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/branches{/branch}","tags_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/tags","blobs_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/git/refs{/sha}","trees_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/statuses/{sha}","languages_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/languages","stargazers_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/stargazers","contributors_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/contributors","subscribers_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/subscribers","subscription_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/subscription","commits_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/commits{/sha}","git_commits_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/git/commits{/sha}","comments_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/comments{/number}","issue_comment_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/issues/comments{/number}","contents_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/contents/{+path}","compare_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/merges","archive_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/downloads","issues_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/issues{/number}","pulls_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/pulls{/number}","milestones_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/milestones{/number}","notifications_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/labels{/name}","releases_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/releases{/id}","deployments_url":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/deployments","created_at":"2016-11-18T16:14:21Z","updated_at":"2016-11-28T12:08:18Z","pushed_at":"2016-12-20T11:33:37Z","git_url":"git://github.com/SoftServe-KhNET/JinnSports.git","ssh_url":"git@github.com:SoftServe-KhNET/JinnSports.git","clone_url":"https://github.com/SoftServe-KhNET/JinnSports.git","svn_url":"https://github.com/SoftServe-KhNET/JinnSports","homepage":null,"size":51199,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/pulls/82"},"html":{"href":"https://github.com/SoftServe-KhNET/JinnSports/pull/82"},"issue":{"href":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/issues/82"},"comments":{"href":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/issues/82/comments"},"review_comments":{"href":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/pulls/82/comments"},"review_comment":{"href":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/pulls/82/commits"},"statuses":{"href":"https://api.github.com/repos/SoftServe-KhNET/JinnSports/statuses/55e4297302b3b7c3efadea5e47b2ff612bb2262e"}}}}
{"actor":{"display_login":"NikitaMagda"}}