{"action":"created","comment":{"url":"https://api.github.com/repos/joinrpg/joinrpg-net/pulls/comments/99490796","pull_request_review_id":20170634,"id":99490796,"diff_hunk":"@@ -0,0 +1,41 @@\n+﻿using System.Collections.Generic;\n+using System.Data.Entity;\n+using System.Linq;\n+using System.Threading.Tasks;\n+using JoinRpg.DataModel;\n+using JoinRpg.Services.Interfaces.Search;\n+using JoinRpg.Data.Write.Interfaces;\n+\n+namespace JoinRpg.Services.Impl.Search\n+{\n+    internal class ProjectSearchProvider : ISearchProvider\n+    {\n+        public IUnitOfWork UnitOfWork { protected get; set; }\n+        public async Task<IReadOnlyCollection<ISearchResult>> SearchAsync(int? currentUserId, string searchString)\n+        {\n+\n+            var results =\n+              await\n+                UnitOfWork.GetDbSet<Project>()\n+                  .Where(pr =>\n+                    (pr.Active==true&&pr.ProjectName.Contains(searchString)\n+                     // || (cg.Description.Contents != null && cg.Description.Contents.Contains(searchString))\n+                     )\n+                  //&& cg.//.IsActive\n+                  )\n+                  .ToListAsync();\n+\n+            return results.Select(proj => new SearchResultImpl\n+            {\n+                LinkType = LinkType.Project,\n+                Name = proj.ProjectName,//plot.MasterTitle,\n+                Description = (proj.Details==null)?\"\":proj.Details.ProjectAnnounce.ToString(),","path":"JoinRpg.Services.Impl/Search/ProjectSearchProvider.cs","position":32,"original_position":32,"commit_id":"dea3fce3fd28ab6d853981ba6cf847a9da6516d2","original_commit_id":"dea3fce3fd28ab6d853981ba6cf847a9da6516d2","user":{"login":"leotsarev","id":909808,"avatar_url":"https://avatars.githubusercontent.com/u/909808?v=3","gravatar_id":"","url":"https://api.github.com/users/leotsarev","html_url":"https://github.com/leotsarev","followers_url":"https://api.github.com/users/leotsarev/followers","following_url":"https://api.github.com/users/leotsarev/following{/other_user}","gists_url":"https://api.github.com/users/leotsarev/gists{/gist_id}","starred_url":"https://api.github.com/users/leotsarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leotsarev/subscriptions","organizations_url":"https://api.github.com/users/leotsarev/orgs","repos_url":"https://api.github.com/users/leotsarev/repos","events_url":"https://api.github.com/users/leotsarev/events{/privacy}","received_events_url":"https://api.github.com/users/leotsarev/received_events","type":"User","site_admin":false},"body":"Также. ProjectAnnounce — это MarkdownString.\r\nDescription — обычная строка.\r\nДля правильного преобразования нужно .ToPlainText()","created_at":"2017-02-05T14:47:44Z","updated_at":"2017-02-05T14:49:14Z","html_url":"https://github.com/joinrpg/joinrpg-net/pull/348#discussion_r99490796","pull_request_url":"https://api.github.com/repos/joinrpg/joinrpg-net/pulls/348","_links":{"self":{"href":"https://api.github.com/repos/joinrpg/joinrpg-net/pulls/comments/99490796"},"html":{"href":"https://github.com/joinrpg/joinrpg-net/pull/348#discussion_r99490796"},"pull_request":{"href":"https://api.github.com/repos/joinrpg/joinrpg-net/pulls/348"}}},"pull_request":{"url":"https://api.github.com/repos/joinrpg/joinrpg-net/pulls/348","id":104701025,"html_url":"https://github.com/joinrpg/joinrpg-net/pull/348","diff_url":"https://github.com/joinrpg/joinrpg-net/pull/348.diff","patch_url":"https://github.com/joinrpg/joinrpg-net/pull/348.patch","issue_url":"https://api.github.com/repos/joinrpg/joinrpg-net/issues/348","number":348,"state":"open","locked":false,"title":"Add project search","user":{"login":"Isilmir","id":25096315,"avatar_url":"https://avatars.githubusercontent.com/u/25096315?v=3","gravatar_id":"","url":"https://api.github.com/users/Isilmir","html_url":"https://github.com/Isilmir","followers_url":"https://api.github.com/users/Isilmir/followers","following_url":"https://api.github.com/users/Isilmir/following{/other_user}","gists_url":"https://api.github.com/users/Isilmir/gists{/gist_id}","starred_url":"https://api.github.com/users/Isilmir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Isilmir/subscriptions","organizations_url":"https://api.github.com/users/Isilmir/orgs","repos_url":"https://api.github.com/users/Isilmir/repos","events_url":"https://api.github.com/users/Isilmir/events{/privacy}","received_events_url":"https://api.github.com/users/Isilmir/received_events","type":"User","site_admin":false},"body":"added ProjectSearchProvider","created_at":"2017-02-05T14:19:06Z","updated_at":"2017-02-05T14:49:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2c48b40d093c9e1c9a4be9932b158a0f2690dbc","assignee":{"login":"leotsarev","id":909808,"avatar_url":"https://avatars.githubusercontent.com/u/909808?v=3","gravatar_id":"","url":"https://api.github.com/users/leotsarev","html_url":"https://github.com/leotsarev","followers_url":"https://api.github.com/users/leotsarev/followers","following_url":"https://api.github.com/users/leotsarev/following{/other_user}","gists_url":"https://api.github.com/users/leotsarev/gists{/gist_id}","starred_url":"https://api.github.com/users/leotsarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leotsarev/subscriptions","organizations_url":"https://api.github.com/users/leotsarev/orgs","repos_url":"https://api.github.com/users/leotsarev/repos","events_url":"https://api.github.com/users/leotsarev/events{/privacy}","received_events_url":"https://api.github.com/users/leotsarev/received_events","type":"User","site_admin":false},"assignees":[{"login":"leotsarev","id":909808,"avatar_url":"https://avatars.githubusercontent.com/u/909808?v=3","gravatar_id":"","url":"https://api.github.com/users/leotsarev","html_url":"https://github.com/leotsarev","followers_url":"https://api.github.com/users/leotsarev/followers","following_url":"https://api.github.com/users/leotsarev/following{/other_user}","gists_url":"https://api.github.com/users/leotsarev/gists{/gist_id}","starred_url":"https://api.github.com/users/leotsarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leotsarev/subscriptions","organizations_url":"https://api.github.com/users/leotsarev/orgs","repos_url":"https://api.github.com/users/leotsarev/repos","events_url":"https://api.github.com/users/leotsarev/events{/privacy}","received_events_url":"https://api.github.com/users/leotsarev/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/joinrpg/joinrpg-net/pulls/348/commits","review_comments_url":"https://api.github.com/repos/joinrpg/joinrpg-net/pulls/348/comments","review_comment_url":"https://api.github.com/repos/joinrpg/joinrpg-net/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joinrpg/joinrpg-net/issues/348/comments","statuses_url":"https://api.github.com/repos/joinrpg/joinrpg-net/statuses/dea3fce3fd28ab6d853981ba6cf847a9da6516d2","head":{"label":"Isilmir:add-project-search","ref":"add-project-search","sha":"dea3fce3fd28ab6d853981ba6cf847a9da6516d2","user":{"login":"Isilmir","id":25096315,"avatar_url":"https://avatars.githubusercontent.com/u/25096315?v=3","gravatar_id":"","url":"https://api.github.com/users/Isilmir","html_url":"https://github.com/Isilmir","followers_url":"https://api.github.com/users/Isilmir/followers","following_url":"https://api.github.com/users/Isilmir/following{/other_user}","gists_url":"https://api.github.com/users/Isilmir/gists{/gist_id}","starred_url":"https://api.github.com/users/Isilmir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Isilmir/subscriptions","organizations_url":"https://api.github.com/users/Isilmir/orgs","repos_url":"https://api.github.com/users/Isilmir/repos","events_url":"https://api.github.com/users/Isilmir/events{/privacy}","received_events_url":"https://api.github.com/users/Isilmir/received_events","type":"User","site_admin":false},"repo":{"id":78825357,"name":"joinrpg-net","full_name":"Isilmir/joinrpg-net","owner":{"login":"Isilmir","id":25096315,"avatar_url":"https://avatars.githubusercontent.com/u/25096315?v=3","gravatar_id":"","url":"https://api.github.com/users/Isilmir","html_url":"https://github.com/Isilmir","followers_url":"https://api.github.com/users/Isilmir/followers","following_url":"https://api.github.com/users/Isilmir/following{/other_user}","gists_url":"https://api.github.com/users/Isilmir/gists{/gist_id}","starred_url":"https://api.github.com/users/Isilmir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Isilmir/subscriptions","organizations_url":"https://api.github.com/users/Isilmir/orgs","repos_url":"https://api.github.com/users/Isilmir/repos","events_url":"https://api.github.com/users/Isilmir/events{/privacy}","received_events_url":"https://api.github.com/users/Isilmir/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Isilmir/joinrpg-net","description":"Joinrpg .NET code","fork":true,"url":"https://api.github.com/repos/Isilmir/joinrpg-net","forks_url":"https://api.github.com/repos/Isilmir/joinrpg-net/forks","keys_url":"https://api.github.com/repos/Isilmir/joinrpg-net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Isilmir/joinrpg-net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Isilmir/joinrpg-net/teams","hooks_url":"https://api.github.com/repos/Isilmir/joinrpg-net/hooks","issue_events_url":"https://api.github.com/repos/Isilmir/joinrpg-net/issues/events{/number}","events_url":"https://api.github.com/repos/Isilmir/joinrpg-net/events","assignees_url":"https://api.github.com/repos/Isilmir/joinrpg-net/assignees{/user}","branches_url":"https://api.github.com/repos/Isilmir/joinrpg-net/branches{/branch}","tags_url":"https://api.github.com/repos/Isilmir/joinrpg-net/tags","blobs_url":"https://api.github.com/repos/Isilmir/joinrpg-net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Isilmir/joinrpg-net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Isilmir/joinrpg-net/git/refs{/sha}","trees_url":"https://api.github.com/repos/Isilmir/joinrpg-net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Isilmir/joinrpg-net/statuses/{sha}","languages_url":"https://api.github.com/repos/Isilmir/joinrpg-net/languages","stargazers_url":"https://api.github.com/repos/Isilmir/joinrpg-net/stargazers","contributors_url":"https://api.github.com/repos/Isilmir/joinrpg-net/contributors","subscribers_url":"https://api.github.com/repos/Isilmir/joinrpg-net/subscribers","subscription_url":"https://api.github.com/repos/Isilmir/joinrpg-net/subscription","commits_url":"https://api.github.com/repos/Isilmir/joinrpg-net/commits{/sha}","git_commits_url":"https://api.github.com/repos/Isilmir/joinrpg-net/git/commits{/sha}","comments_url":"https://api.github.com/repos/Isilmir/joinrpg-net/comments{/number}","issue_comment_url":"https://api.github.com/repos/Isilmir/joinrpg-net/issues/comments{/number}","contents_url":"https://api.github.com/repos/Isilmir/joinrpg-net/contents/{+path}","compare_url":"https://api.github.com/repos/Isilmir/joinrpg-net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Isilmir/joinrpg-net/merges","archive_url":"https://api.github.com/repos/Isilmir/joinrpg-net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Isilmir/joinrpg-net/downloads","issues_url":"https://api.github.com/repos/Isilmir/joinrpg-net/issues{/number}","pulls_url":"https://api.github.com/repos/Isilmir/joinrpg-net/pulls{/number}","milestones_url":"https://api.github.com/repos/Isilmir/joinrpg-net/milestones{/number}","notifications_url":"https://api.github.com/repos/Isilmir/joinrpg-net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Isilmir/joinrpg-net/labels{/name}","releases_url":"https://api.github.com/repos/Isilmir/joinrpg-net/releases{/id}","deployments_url":"https://api.github.com/repos/Isilmir/joinrpg-net/deployments","created_at":"2017-01-13T07:17:35Z","updated_at":"2017-01-13T07:17:39Z","pushed_at":"2017-02-05T14:10:53Z","git_url":"git://github.com/Isilmir/joinrpg-net.git","ssh_url":"git@github.com:Isilmir/joinrpg-net.git","clone_url":"https://github.com/Isilmir/joinrpg-net.git","svn_url":"https://github.com/Isilmir/joinrpg-net","homepage":null,"size":18565,"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":"master"}},"base":{"label":"joinrpg:master","ref":"master","sha":"3b7871b2e4cf40c0497790420025340f77d6a347","user":{"login":"joinrpg","id":8638806,"avatar_url":"https://avatars.githubusercontent.com/u/8638806?v=3","gravatar_id":"","url":"https://api.github.com/users/joinrpg","html_url":"https://github.com/joinrpg","followers_url":"https://api.github.com/users/joinrpg/followers","following_url":"https://api.github.com/users/joinrpg/following{/other_user}","gists_url":"https://api.github.com/users/joinrpg/gists{/gist_id}","starred_url":"https://api.github.com/users/joinrpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joinrpg/subscriptions","organizations_url":"https://api.github.com/users/joinrpg/orgs","repos_url":"https://api.github.com/users/joinrpg/repos","events_url":"https://api.github.com/users/joinrpg/events{/privacy}","received_events_url":"https://api.github.com/users/joinrpg/received_events","type":"Organization","site_admin":false},"repo":{"id":54428058,"name":"joinrpg-net","full_name":"joinrpg/joinrpg-net","owner":{"login":"joinrpg","id":8638806,"avatar_url":"https://avatars.githubusercontent.com/u/8638806?v=3","gravatar_id":"","url":"https://api.github.com/users/joinrpg","html_url":"https://github.com/joinrpg","followers_url":"https://api.github.com/users/joinrpg/followers","following_url":"https://api.github.com/users/joinrpg/following{/other_user}","gists_url":"https://api.github.com/users/joinrpg/gists{/gist_id}","starred_url":"https://api.github.com/users/joinrpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joinrpg/subscriptions","organizations_url":"https://api.github.com/users/joinrpg/orgs","repos_url":"https://api.github.com/users/joinrpg/repos","events_url":"https://api.github.com/users/joinrpg/events{/privacy}","received_events_url":"https://api.github.com/users/joinrpg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joinrpg/joinrpg-net","description":"Joinrpg .NET code","fork":false,"url":"https://api.github.com/repos/joinrpg/joinrpg-net","forks_url":"https://api.github.com/repos/joinrpg/joinrpg-net/forks","keys_url":"https://api.github.com/repos/joinrpg/joinrpg-net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joinrpg/joinrpg-net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joinrpg/joinrpg-net/teams","hooks_url":"https://api.github.com/repos/joinrpg/joinrpg-net/hooks","issue_events_url":"https://api.github.com/repos/joinrpg/joinrpg-net/issues/events{/number}","events_url":"https://api.github.com/repos/joinrpg/joinrpg-net/events","assignees_url":"https://api.github.com/repos/joinrpg/joinrpg-net/assignees{/user}","branches_url":"https://api.github.com/repos/joinrpg/joinrpg-net/branches{/branch}","tags_url":"https://api.github.com/repos/joinrpg/joinrpg-net/tags","blobs_url":"https://api.github.com/repos/joinrpg/joinrpg-net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joinrpg/joinrpg-net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joinrpg/joinrpg-net/git/refs{/sha}","trees_url":"https://api.github.com/repos/joinrpg/joinrpg-net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joinrpg/joinrpg-net/statuses/{sha}","languages_url":"https://api.github.com/repos/joinrpg/joinrpg-net/languages","stargazers_url":"https://api.github.com/repos/joinrpg/joinrpg-net/stargazers","contributors_url":"https://api.github.com/repos/joinrpg/joinrpg-net/contributors","subscribers_url":"https://api.github.com/repos/joinrpg/joinrpg-net/subscribers","subscription_url":"https://api.github.com/repos/joinrpg/joinrpg-net/subscription","commits_url":"https://api.github.com/repos/joinrpg/joinrpg-net/commits{/sha}","git_commits_url":"https://api.github.com/repos/joinrpg/joinrpg-net/git/commits{/sha}","comments_url":"https://api.github.com/repos/joinrpg/joinrpg-net/comments{/number}","issue_comment_url":"https://api.github.com/repos/joinrpg/joinrpg-net/issues/comments{/number}","contents_url":"https://api.github.com/repos/joinrpg/joinrpg-net/contents/{+path}","compare_url":"https://api.github.com/repos/joinrpg/joinrpg-net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joinrpg/joinrpg-net/merges","archive_url":"https://api.github.com/repos/joinrpg/joinrpg-net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joinrpg/joinrpg-net/downloads","issues_url":"https://api.github.com/repos/joinrpg/joinrpg-net/issues{/number}","pulls_url":"https://api.github.com/repos/joinrpg/joinrpg-net/pulls{/number}","milestones_url":"https://api.github.com/repos/joinrpg/joinrpg-net/milestones{/number}","notifications_url":"https://api.github.com/repos/joinrpg/joinrpg-net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joinrpg/joinrpg-net/labels{/name}","releases_url":"https://api.github.com/repos/joinrpg/joinrpg-net/releases{/id}","deployments_url":"https://api.github.com/repos/joinrpg/joinrpg-net/deployments","created_at":"2016-03-21T22:41:28Z","updated_at":"2017-02-05T14:33:55Z","pushed_at":"2017-02-05T14:19:07Z","git_url":"git://github.com/joinrpg/joinrpg-net.git","ssh_url":"git@github.com:joinrpg/joinrpg-net.git","clone_url":"https://github.com/joinrpg/joinrpg-net.git","svn_url":"https://github.com/joinrpg/joinrpg-net","homepage":null,"size":18815,"stargazers_count":3,"watchers_count":3,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":66,"forks":7,"open_issues":66,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/joinrpg/joinrpg-net/pulls/348"},"html":{"href":"https://github.com/joinrpg/joinrpg-net/pull/348"},"issue":{"href":"https://api.github.com/repos/joinrpg/joinrpg-net/issues/348"},"comments":{"href":"https://api.github.com/repos/joinrpg/joinrpg-net/issues/348/comments"},"review_comments":{"href":"https://api.github.com/repos/joinrpg/joinrpg-net/pulls/348/comments"},"review_comment":{"href":"https://api.github.com/repos/joinrpg/joinrpg-net/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joinrpg/joinrpg-net/pulls/348/commits"},"statuses":{"href":"https://api.github.com/repos/joinrpg/joinrpg-net/statuses/dea3fce3fd28ab6d853981ba6cf847a9da6516d2"}}}}
{"actor":{"display_login":"leotsarev"}}