{"action":"created","comment":{"url":"https://api.github.com/repos/pro-rent/Pure/pulls/comments/66569239","id":66569239,"diff_hunk":"@@ -83,9 +83,17 @@ public class FilesController : DataControllerBase<PureDbContext>\n \t\t\tif (file == null)\n \t\t\t\treturn NotFound();\n \n-\t\t\tData.Remove(file);\n+\t\t\t//removes all related thumbnails if exists\n+\t\t\tvar thumbnails = await Data.Files\n+\t\t\t\t.Where(f => f.ThumbnailSourceId == file.Id)\n+\t\t\t\t.ToArrayAsync();\n \n+\t\t\tData.RemoveRange(thumbnails);\n \t\t\tawait Data.SaveChangesAsync();\n+\n+\t\t\tData.Remove(file);\n+\t\t\tawait Data.SaveChangesAsync();","path":"src/Mindfor.Pure.Modules.Media/Modules/Media/Controllers/FilesController.cs","position":20,"original_position":14,"commit_id":"2ace183ca432492bf2b62ada7c18863ebb1b1059","original_commit_id":"28d2bf744450ffcf5c19e613646b146735b6b21a","user":{"login":"anfomin","id":1905503,"avatar_url":"https://avatars.githubusercontent.com/u/1905503?v=3","gravatar_id":"","url":"https://api.github.com/users/anfomin","html_url":"https://github.com/anfomin","followers_url":"https://api.github.com/users/anfomin/followers","following_url":"https://api.github.com/users/anfomin/following{/other_user}","gists_url":"https://api.github.com/users/anfomin/gists{/gist_id}","starred_url":"https://api.github.com/users/anfomin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anfomin/subscriptions","organizations_url":"https://api.github.com/users/anfomin/orgs","repos_url":"https://api.github.com/users/anfomin/repos","events_url":"https://api.github.com/users/anfomin/events{/privacy}","received_events_url":"https://api.github.com/users/anfomin/received_events","type":"User","site_admin":false},"body":"@Niaro как это поток не возвращает управление? На строке сохранения?","created_at":"2016-06-10T06:59:50Z","updated_at":"2016-06-10T06:59:50Z","html_url":"https://github.com/pro-rent/Pure/pull/24#discussion_r66569239","pull_request_url":"https://api.github.com/repos/pro-rent/Pure/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/pro-rent/Pure/pulls/comments/66569239"},"html":{"href":"https://github.com/pro-rent/Pure/pull/24#discussion_r66569239"},"pull_request":{"href":"https://api.github.com/repos/pro-rent/Pure/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/pro-rent/Pure/pulls/24","id":73228049,"html_url":"https://github.com/pro-rent/Pure/pull/24","diff_url":"https://github.com/pro-rent/Pure/pull/24.diff","patch_url":"https://github.com/pro-rent/Pure/pull/24.patch","issue_url":"https://api.github.com/repos/pro-rent/Pure/issues/24","number":24,"state":"open","locked":false,"title":"Фиксы файлменеджера в макрдаун виджете","user":{"login":"Niaro","id":7147943,"avatar_url":"https://avatars.githubusercontent.com/u/7147943?v=3","gravatar_id":"","url":"https://api.github.com/users/Niaro","html_url":"https://github.com/Niaro","followers_url":"https://api.github.com/users/Niaro/followers","following_url":"https://api.github.com/users/Niaro/following{/other_user}","gists_url":"https://api.github.com/users/Niaro/gists{/gist_id}","starred_url":"https://api.github.com/users/Niaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Niaro/subscriptions","organizations_url":"https://api.github.com/users/Niaro/orgs","repos_url":"https://api.github.com/users/Niaro/repos","events_url":"https://api.github.com/users/Niaro/events{/privacy}","received_events_url":"https://api.github.com/users/Niaro/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-09T14:50:48Z","updated_at":"2016-06-10T06:59:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4cab63efe05c1606c0ad23ff5cad8d484ed8477","assignee":{"login":"Niaro","id":7147943,"avatar_url":"https://avatars.githubusercontent.com/u/7147943?v=3","gravatar_id":"","url":"https://api.github.com/users/Niaro","html_url":"https://github.com/Niaro","followers_url":"https://api.github.com/users/Niaro/followers","following_url":"https://api.github.com/users/Niaro/following{/other_user}","gists_url":"https://api.github.com/users/Niaro/gists{/gist_id}","starred_url":"https://api.github.com/users/Niaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Niaro/subscriptions","organizations_url":"https://api.github.com/users/Niaro/orgs","repos_url":"https://api.github.com/users/Niaro/repos","events_url":"https://api.github.com/users/Niaro/events{/privacy}","received_events_url":"https://api.github.com/users/Niaro/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/pro-rent/Pure/pulls/24/commits","review_comments_url":"https://api.github.com/repos/pro-rent/Pure/pulls/24/comments","review_comment_url":"https://api.github.com/repos/pro-rent/Pure/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pro-rent/Pure/issues/24/comments","statuses_url":"https://api.github.com/repos/pro-rent/Pure/statuses/2ace183ca432492bf2b62ada7c18863ebb1b1059","head":{"label":"pro-rent:Markdowns_filemanager_fixes","ref":"Markdowns_filemanager_fixes","sha":"2ace183ca432492bf2b62ada7c18863ebb1b1059","user":{"login":"pro-rent","id":19193322,"avatar_url":"https://avatars.githubusercontent.com/u/19193322?v=3","gravatar_id":"","url":"https://api.github.com/users/pro-rent","html_url":"https://github.com/pro-rent","followers_url":"https://api.github.com/users/pro-rent/followers","following_url":"https://api.github.com/users/pro-rent/following{/other_user}","gists_url":"https://api.github.com/users/pro-rent/gists{/gist_id}","starred_url":"https://api.github.com/users/pro-rent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pro-rent/subscriptions","organizations_url":"https://api.github.com/users/pro-rent/orgs","repos_url":"https://api.github.com/users/pro-rent/repos","events_url":"https://api.github.com/users/pro-rent/events{/privacy}","received_events_url":"https://api.github.com/users/pro-rent/received_events","type":"Organization","site_admin":false},"repo":{"id":29254168,"name":"Pure","full_name":"pro-rent/Pure","owner":{"login":"pro-rent","id":19193322,"avatar_url":"https://avatars.githubusercontent.com/u/19193322?v=3","gravatar_id":"","url":"https://api.github.com/users/pro-rent","html_url":"https://github.com/pro-rent","followers_url":"https://api.github.com/users/pro-rent/followers","following_url":"https://api.github.com/users/pro-rent/following{/other_user}","gists_url":"https://api.github.com/users/pro-rent/gists{/gist_id}","starred_url":"https://api.github.com/users/pro-rent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pro-rent/subscriptions","organizations_url":"https://api.github.com/users/pro-rent/orgs","repos_url":"https://api.github.com/users/pro-rent/repos","events_url":"https://api.github.com/users/pro-rent/events{/privacy}","received_events_url":"https://api.github.com/users/pro-rent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pro-rent/Pure","description":"Framework to create web applications using ASP.NET Core","fork":false,"url":"https://api.github.com/repos/pro-rent/Pure","forks_url":"https://api.github.com/repos/pro-rent/Pure/forks","keys_url":"https://api.github.com/repos/pro-rent/Pure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pro-rent/Pure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pro-rent/Pure/teams","hooks_url":"https://api.github.com/repos/pro-rent/Pure/hooks","issue_events_url":"https://api.github.com/repos/pro-rent/Pure/issues/events{/number}","events_url":"https://api.github.com/repos/pro-rent/Pure/events","assignees_url":"https://api.github.com/repos/pro-rent/Pure/assignees{/user}","branches_url":"https://api.github.com/repos/pro-rent/Pure/branches{/branch}","tags_url":"https://api.github.com/repos/pro-rent/Pure/tags","blobs_url":"https://api.github.com/repos/pro-rent/Pure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pro-rent/Pure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pro-rent/Pure/git/refs{/sha}","trees_url":"https://api.github.com/repos/pro-rent/Pure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pro-rent/Pure/statuses/{sha}","languages_url":"https://api.github.com/repos/pro-rent/Pure/languages","stargazers_url":"https://api.github.com/repos/pro-rent/Pure/stargazers","contributors_url":"https://api.github.com/repos/pro-rent/Pure/contributors","subscribers_url":"https://api.github.com/repos/pro-rent/Pure/subscribers","subscription_url":"https://api.github.com/repos/pro-rent/Pure/subscription","commits_url":"https://api.github.com/repos/pro-rent/Pure/commits{/sha}","git_commits_url":"https://api.github.com/repos/pro-rent/Pure/git/commits{/sha}","comments_url":"https://api.github.com/repos/pro-rent/Pure/comments{/number}","issue_comment_url":"https://api.github.com/repos/pro-rent/Pure/issues/comments{/number}","contents_url":"https://api.github.com/repos/pro-rent/Pure/contents/{+path}","compare_url":"https://api.github.com/repos/pro-rent/Pure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pro-rent/Pure/merges","archive_url":"https://api.github.com/repos/pro-rent/Pure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pro-rent/Pure/downloads","issues_url":"https://api.github.com/repos/pro-rent/Pure/issues{/number}","pulls_url":"https://api.github.com/repos/pro-rent/Pure/pulls{/number}","milestones_url":"https://api.github.com/repos/pro-rent/Pure/milestones{/number}","notifications_url":"https://api.github.com/repos/pro-rent/Pure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pro-rent/Pure/labels{/name}","releases_url":"https://api.github.com/repos/pro-rent/Pure/releases{/id}","deployments_url":"https://api.github.com/repos/pro-rent/Pure/deployments","created_at":"2015-01-14T16:38:53Z","updated_at":"2016-05-16T10:37:18Z","pushed_at":"2016-06-09T14:50:48Z","git_url":"git://github.com/pro-rent/Pure.git","ssh_url":"git@github.com:pro-rent/Pure.git","clone_url":"https://github.com/pro-rent/Pure.git","svn_url":"https://github.com/pro-rent/Pure","homepage":"","size":4978,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"pro-rent:master","ref":"master","sha":"d4d7689914ebdee9ec2f0ba1c1a85db7c2b7743c","user":{"login":"pro-rent","id":19193322,"avatar_url":"https://avatars.githubusercontent.com/u/19193322?v=3","gravatar_id":"","url":"https://api.github.com/users/pro-rent","html_url":"https://github.com/pro-rent","followers_url":"https://api.github.com/users/pro-rent/followers","following_url":"https://api.github.com/users/pro-rent/following{/other_user}","gists_url":"https://api.github.com/users/pro-rent/gists{/gist_id}","starred_url":"https://api.github.com/users/pro-rent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pro-rent/subscriptions","organizations_url":"https://api.github.com/users/pro-rent/orgs","repos_url":"https://api.github.com/users/pro-rent/repos","events_url":"https://api.github.com/users/pro-rent/events{/privacy}","received_events_url":"https://api.github.com/users/pro-rent/received_events","type":"Organization","site_admin":false},"repo":{"id":29254168,"name":"Pure","full_name":"pro-rent/Pure","owner":{"login":"pro-rent","id":19193322,"avatar_url":"https://avatars.githubusercontent.com/u/19193322?v=3","gravatar_id":"","url":"https://api.github.com/users/pro-rent","html_url":"https://github.com/pro-rent","followers_url":"https://api.github.com/users/pro-rent/followers","following_url":"https://api.github.com/users/pro-rent/following{/other_user}","gists_url":"https://api.github.com/users/pro-rent/gists{/gist_id}","starred_url":"https://api.github.com/users/pro-rent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pro-rent/subscriptions","organizations_url":"https://api.github.com/users/pro-rent/orgs","repos_url":"https://api.github.com/users/pro-rent/repos","events_url":"https://api.github.com/users/pro-rent/events{/privacy}","received_events_url":"https://api.github.com/users/pro-rent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pro-rent/Pure","description":"Framework to create web applications using ASP.NET Core","fork":false,"url":"https://api.github.com/repos/pro-rent/Pure","forks_url":"https://api.github.com/repos/pro-rent/Pure/forks","keys_url":"https://api.github.com/repos/pro-rent/Pure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pro-rent/Pure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pro-rent/Pure/teams","hooks_url":"https://api.github.com/repos/pro-rent/Pure/hooks","issue_events_url":"https://api.github.com/repos/pro-rent/Pure/issues/events{/number}","events_url":"https://api.github.com/repos/pro-rent/Pure/events","assignees_url":"https://api.github.com/repos/pro-rent/Pure/assignees{/user}","branches_url":"https://api.github.com/repos/pro-rent/Pure/branches{/branch}","tags_url":"https://api.github.com/repos/pro-rent/Pure/tags","blobs_url":"https://api.github.com/repos/pro-rent/Pure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pro-rent/Pure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pro-rent/Pure/git/refs{/sha}","trees_url":"https://api.github.com/repos/pro-rent/Pure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pro-rent/Pure/statuses/{sha}","languages_url":"https://api.github.com/repos/pro-rent/Pure/languages","stargazers_url":"https://api.github.com/repos/pro-rent/Pure/stargazers","contributors_url":"https://api.github.com/repos/pro-rent/Pure/contributors","subscribers_url":"https://api.github.com/repos/pro-rent/Pure/subscribers","subscription_url":"https://api.github.com/repos/pro-rent/Pure/subscription","commits_url":"https://api.github.com/repos/pro-rent/Pure/commits{/sha}","git_commits_url":"https://api.github.com/repos/pro-rent/Pure/git/commits{/sha}","comments_url":"https://api.github.com/repos/pro-rent/Pure/comments{/number}","issue_comment_url":"https://api.github.com/repos/pro-rent/Pure/issues/comments{/number}","contents_url":"https://api.github.com/repos/pro-rent/Pure/contents/{+path}","compare_url":"https://api.github.com/repos/pro-rent/Pure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pro-rent/Pure/merges","archive_url":"https://api.github.com/repos/pro-rent/Pure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pro-rent/Pure/downloads","issues_url":"https://api.github.com/repos/pro-rent/Pure/issues{/number}","pulls_url":"https://api.github.com/repos/pro-rent/Pure/pulls{/number}","milestones_url":"https://api.github.com/repos/pro-rent/Pure/milestones{/number}","notifications_url":"https://api.github.com/repos/pro-rent/Pure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pro-rent/Pure/labels{/name}","releases_url":"https://api.github.com/repos/pro-rent/Pure/releases{/id}","deployments_url":"https://api.github.com/repos/pro-rent/Pure/deployments","created_at":"2015-01-14T16:38:53Z","updated_at":"2016-05-16T10:37:18Z","pushed_at":"2016-06-09T14:50:48Z","git_url":"git://github.com/pro-rent/Pure.git","ssh_url":"git@github.com:pro-rent/Pure.git","clone_url":"https://github.com/pro-rent/Pure.git","svn_url":"https://github.com/pro-rent/Pure","homepage":"","size":4978,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pro-rent/Pure/pulls/24"},"html":{"href":"https://github.com/pro-rent/Pure/pull/24"},"issue":{"href":"https://api.github.com/repos/pro-rent/Pure/issues/24"},"comments":{"href":"https://api.github.com/repos/pro-rent/Pure/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/pro-rent/Pure/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/pro-rent/Pure/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pro-rent/Pure/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/pro-rent/Pure/statuses/2ace183ca432492bf2b62ada7c18863ebb1b1059"}}}}
{"actor":{"display_login":"anfomin"}}