{"action":"created","comment":{"url":"https://api.github.com/repos/s3364859/CPT331/pulls/comments/85655613","pull_request_review_id":6360319,"id":85655613,"diff_hunk":"@@ -0,0 +1,46 @@\n+﻿#region Using References\n+\n+using System;\n+using System.ComponentModel.DataAnnotations;\n+\n+using CPT331.Core.ObjectModel;\n+using CPT331.Data;\n+\n+#endregion\n+\n+namespace CPT331.Web.Validation\n+{\n+    /// <summary>\n+    /// Provides validation against existing OffenceCategory records.\n+    /// </summary>\n+\tpublic class OffenceCategoryAttribute : ValidationAttribute\n+\t{\n+        /// <summary>\n+        /// Checks the database for OffenceCategory records based on a specified ID value.\n+        /// </summary>\n+        /// <param name=\"value\">The ID value for the Offence record.</param>\n+        /// <returns>true if the Offence exists; true if the value argument was null; otherwise false.</returns>\n+        public override bool IsValid(object value)\n+\t\t{\n+            bool isValid = false;\n+\n+            if (value != null)\n+            {\n+                int id = 0;\n+\n+                if (Int32.TryParse(value.ToString(), out id) == true)\n+                {\n+                    OffenceCategory localGovernmentArea = OffenceCategoryRepository.GetOffenceCategoryByID(id);\n+\n+                    isValid = (localGovernmentArea != null);\n+                }\n+            }\n+            else\n+            {\n+                isValid = true;","path":"CPT331.Web/Validation/OffenceCategoryAttribute.cs","position":40,"original_position":40,"commit_id":"33fc6ed3a77956d75d709f3fc73caad7821f5f75","original_commit_id":"33fc6ed3a77956d75d709f3fc73caad7821f5f75","user":{"login":"6nop","id":8229599,"avatar_url":"https://avatars.githubusercontent.com/u/8229599?v=3","gravatar_id":"","url":"https://api.github.com/users/6nop","html_url":"https://github.com/6nop","followers_url":"https://api.github.com/users/6nop/followers","following_url":"https://api.github.com/users/6nop/following{/other_user}","gists_url":"https://api.github.com/users/6nop/gists{/gist_id}","starred_url":"https://api.github.com/users/6nop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6nop/subscriptions","organizations_url":"https://api.github.com/users/6nop/orgs","repos_url":"https://api.github.com/users/6nop/repos","events_url":"https://api.github.com/users/6nop/events{/privacy}","received_events_url":"https://api.github.com/users/6nop/received_events","type":"User","site_admin":false},"body":"Quick fix to allow nulls until properly implemented","created_at":"2016-10-30T08:59:29Z","updated_at":"2016-10-30T08:59:29Z","html_url":"https://github.com/s3364859/CPT331/pull/33#discussion_r85655613","pull_request_url":"https://api.github.com/repos/s3364859/CPT331/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/s3364859/CPT331/pulls/comments/85655613"},"html":{"href":"https://github.com/s3364859/CPT331/pull/33#discussion_r85655613"},"pull_request":{"href":"https://api.github.com/repos/s3364859/CPT331/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/s3364859/CPT331/pulls/33","id":91515497,"html_url":"https://github.com/s3364859/CPT331/pull/33","diff_url":"https://github.com/s3364859/CPT331/pull/33.diff","patch_url":"https://github.com/s3364859/CPT331/pull/33.patch","issue_url":"https://api.github.com/repos/s3364859/CPT331/issues/33","number":33,"state":"open","locked":false,"title":"Web XML commenting","user":{"login":"6nop","id":8229599,"avatar_url":"https://avatars.githubusercontent.com/u/8229599?v=3","gravatar_id":"","url":"https://api.github.com/users/6nop","html_url":"https://github.com/6nop","followers_url":"https://api.github.com/users/6nop/followers","following_url":"https://api.github.com/users/6nop/following{/other_user}","gists_url":"https://api.github.com/users/6nop/gists{/gist_id}","starred_url":"https://api.github.com/users/6nop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6nop/subscriptions","organizations_url":"https://api.github.com/users/6nop/orgs","repos_url":"https://api.github.com/users/6nop/repos","events_url":"https://api.github.com/users/6nop/events{/privacy}","received_events_url":"https://api.github.com/users/6nop/received_events","type":"User","site_admin":false},"body":"Hi @s3364859, @s3364942, @s3494110 , @s3482247,\r\n\r\n![IMG bashing keyboard](https://officialfantasy.files.wordpress.com/2013/05/look1.gif)\r\n\r\n* Added XML commenting for the WEB and API projects.\r\n* Added additional code so swagger makes use of XML comments.\r\n* Configured projects to build XML comments when a build takes place.\r\n* Adding missing validator OffenceCategoryAttribute (allowing nulls).\r\n\r\nDoug","created_at":"2016-10-30T08:58:09Z","updated_at":"2016-10-30T08:59:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b708e99577cc81f647a8f732d25e1512fc2283cd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/s3364859/CPT331/pulls/33/commits","review_comments_url":"https://api.github.com/repos/s3364859/CPT331/pulls/33/comments","review_comment_url":"https://api.github.com/repos/s3364859/CPT331/pulls/comments{/number}","comments_url":"https://api.github.com/repos/s3364859/CPT331/issues/33/comments","statuses_url":"https://api.github.com/repos/s3364859/CPT331/statuses/33fc6ed3a77956d75d709f3fc73caad7821f5f75","head":{"label":"6nop:WebXmlCommenting","ref":"WebXmlCommenting","sha":"33fc6ed3a77956d75d709f3fc73caad7821f5f75","user":{"login":"6nop","id":8229599,"avatar_url":"https://avatars.githubusercontent.com/u/8229599?v=3","gravatar_id":"","url":"https://api.github.com/users/6nop","html_url":"https://github.com/6nop","followers_url":"https://api.github.com/users/6nop/followers","following_url":"https://api.github.com/users/6nop/following{/other_user}","gists_url":"https://api.github.com/users/6nop/gists{/gist_id}","starred_url":"https://api.github.com/users/6nop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6nop/subscriptions","organizations_url":"https://api.github.com/users/6nop/orgs","repos_url":"https://api.github.com/users/6nop/repos","events_url":"https://api.github.com/users/6nop/events{/privacy}","received_events_url":"https://api.github.com/users/6nop/received_events","type":"User","site_admin":false},"repo":{"id":67416010,"name":"CPT331","full_name":"6nop/CPT331","owner":{"login":"6nop","id":8229599,"avatar_url":"https://avatars.githubusercontent.com/u/8229599?v=3","gravatar_id":"","url":"https://api.github.com/users/6nop","html_url":"https://github.com/6nop","followers_url":"https://api.github.com/users/6nop/followers","following_url":"https://api.github.com/users/6nop/following{/other_user}","gists_url":"https://api.github.com/users/6nop/gists{/gist_id}","starred_url":"https://api.github.com/users/6nop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6nop/subscriptions","organizations_url":"https://api.github.com/users/6nop/orgs","repos_url":"https://api.github.com/users/6nop/repos","events_url":"https://api.github.com/users/6nop/events{/privacy}","received_events_url":"https://api.github.com/users/6nop/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/6nop/CPT331","description":null,"fork":true,"url":"https://api.github.com/repos/6nop/CPT331","forks_url":"https://api.github.com/repos/6nop/CPT331/forks","keys_url":"https://api.github.com/repos/6nop/CPT331/keys{/key_id}","collaborators_url":"https://api.github.com/repos/6nop/CPT331/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/6nop/CPT331/teams","hooks_url":"https://api.github.com/repos/6nop/CPT331/hooks","issue_events_url":"https://api.github.com/repos/6nop/CPT331/issues/events{/number}","events_url":"https://api.github.com/repos/6nop/CPT331/events","assignees_url":"https://api.github.com/repos/6nop/CPT331/assignees{/user}","branches_url":"https://api.github.com/repos/6nop/CPT331/branches{/branch}","tags_url":"https://api.github.com/repos/6nop/CPT331/tags","blobs_url":"https://api.github.com/repos/6nop/CPT331/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/6nop/CPT331/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/6nop/CPT331/git/refs{/sha}","trees_url":"https://api.github.com/repos/6nop/CPT331/git/trees{/sha}","statuses_url":"https://api.github.com/repos/6nop/CPT331/statuses/{sha}","languages_url":"https://api.github.com/repos/6nop/CPT331/languages","stargazers_url":"https://api.github.com/repos/6nop/CPT331/stargazers","contributors_url":"https://api.github.com/repos/6nop/CPT331/contributors","subscribers_url":"https://api.github.com/repos/6nop/CPT331/subscribers","subscription_url":"https://api.github.com/repos/6nop/CPT331/subscription","commits_url":"https://api.github.com/repos/6nop/CPT331/commits{/sha}","git_commits_url":"https://api.github.com/repos/6nop/CPT331/git/commits{/sha}","comments_url":"https://api.github.com/repos/6nop/CPT331/comments{/number}","issue_comment_url":"https://api.github.com/repos/6nop/CPT331/issues/comments{/number}","contents_url":"https://api.github.com/repos/6nop/CPT331/contents/{+path}","compare_url":"https://api.github.com/repos/6nop/CPT331/compare/{base}...{head}","merges_url":"https://api.github.com/repos/6nop/CPT331/merges","archive_url":"https://api.github.com/repos/6nop/CPT331/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/6nop/CPT331/downloads","issues_url":"https://api.github.com/repos/6nop/CPT331/issues{/number}","pulls_url":"https://api.github.com/repos/6nop/CPT331/pulls{/number}","milestones_url":"https://api.github.com/repos/6nop/CPT331/milestones{/number}","notifications_url":"https://api.github.com/repos/6nop/CPT331/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/6nop/CPT331/labels{/name}","releases_url":"https://api.github.com/repos/6nop/CPT331/releases{/id}","deployments_url":"https://api.github.com/repos/6nop/CPT331/deployments","created_at":"2016-09-05T11:41:41Z","updated_at":"2016-10-18T04:00:39Z","pushed_at":"2016-10-30T08:50:35Z","git_url":"git://github.com/6nop/CPT331.git","ssh_url":"git@github.com:6nop/CPT331.git","clone_url":"https://github.com/6nop/CPT331.git","svn_url":"https://github.com/6nop/CPT331","homepage":null,"size":6359,"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":"s3364859:master","ref":"master","sha":"c818cae699697d11d69ce2e4a86ed58038eab3e8","user":{"login":"s3364859","id":22001846,"avatar_url":"https://avatars.githubusercontent.com/u/22001846?v=3","gravatar_id":"","url":"https://api.github.com/users/s3364859","html_url":"https://github.com/s3364859","followers_url":"https://api.github.com/users/s3364859/followers","following_url":"https://api.github.com/users/s3364859/following{/other_user}","gists_url":"https://api.github.com/users/s3364859/gists{/gist_id}","starred_url":"https://api.github.com/users/s3364859/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s3364859/subscriptions","organizations_url":"https://api.github.com/users/s3364859/orgs","repos_url":"https://api.github.com/users/s3364859/repos","events_url":"https://api.github.com/users/s3364859/events{/privacy}","received_events_url":"https://api.github.com/users/s3364859/received_events","type":"User","site_admin":false},"repo":{"id":67406982,"name":"CPT331","full_name":"s3364859/CPT331","owner":{"login":"s3364859","id":22001846,"avatar_url":"https://avatars.githubusercontent.com/u/22001846?v=3","gravatar_id":"","url":"https://api.github.com/users/s3364859","html_url":"https://github.com/s3364859","followers_url":"https://api.github.com/users/s3364859/followers","following_url":"https://api.github.com/users/s3364859/following{/other_user}","gists_url":"https://api.github.com/users/s3364859/gists{/gist_id}","starred_url":"https://api.github.com/users/s3364859/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s3364859/subscriptions","organizations_url":"https://api.github.com/users/s3364859/orgs","repos_url":"https://api.github.com/users/s3364859/repos","events_url":"https://api.github.com/users/s3364859/events{/privacy}","received_events_url":"https://api.github.com/users/s3364859/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/s3364859/CPT331","description":"EventGuardian - Spatio News Stands","fork":false,"url":"https://api.github.com/repos/s3364859/CPT331","forks_url":"https://api.github.com/repos/s3364859/CPT331/forks","keys_url":"https://api.github.com/repos/s3364859/CPT331/keys{/key_id}","collaborators_url":"https://api.github.com/repos/s3364859/CPT331/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/s3364859/CPT331/teams","hooks_url":"https://api.github.com/repos/s3364859/CPT331/hooks","issue_events_url":"https://api.github.com/repos/s3364859/CPT331/issues/events{/number}","events_url":"https://api.github.com/repos/s3364859/CPT331/events","assignees_url":"https://api.github.com/repos/s3364859/CPT331/assignees{/user}","branches_url":"https://api.github.com/repos/s3364859/CPT331/branches{/branch}","tags_url":"https://api.github.com/repos/s3364859/CPT331/tags","blobs_url":"https://api.github.com/repos/s3364859/CPT331/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/s3364859/CPT331/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/s3364859/CPT331/git/refs{/sha}","trees_url":"https://api.github.com/repos/s3364859/CPT331/git/trees{/sha}","statuses_url":"https://api.github.com/repos/s3364859/CPT331/statuses/{sha}","languages_url":"https://api.github.com/repos/s3364859/CPT331/languages","stargazers_url":"https://api.github.com/repos/s3364859/CPT331/stargazers","contributors_url":"https://api.github.com/repos/s3364859/CPT331/contributors","subscribers_url":"https://api.github.com/repos/s3364859/CPT331/subscribers","subscription_url":"https://api.github.com/repos/s3364859/CPT331/subscription","commits_url":"https://api.github.com/repos/s3364859/CPT331/commits{/sha}","git_commits_url":"https://api.github.com/repos/s3364859/CPT331/git/commits{/sha}","comments_url":"https://api.github.com/repos/s3364859/CPT331/comments{/number}","issue_comment_url":"https://api.github.com/repos/s3364859/CPT331/issues/comments{/number}","contents_url":"https://api.github.com/repos/s3364859/CPT331/contents/{+path}","compare_url":"https://api.github.com/repos/s3364859/CPT331/compare/{base}...{head}","merges_url":"https://api.github.com/repos/s3364859/CPT331/merges","archive_url":"https://api.github.com/repos/s3364859/CPT331/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/s3364859/CPT331/downloads","issues_url":"https://api.github.com/repos/s3364859/CPT331/issues{/number}","pulls_url":"https://api.github.com/repos/s3364859/CPT331/pulls{/number}","milestones_url":"https://api.github.com/repos/s3364859/CPT331/milestones{/number}","notifications_url":"https://api.github.com/repos/s3364859/CPT331/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/s3364859/CPT331/labels{/name}","releases_url":"https://api.github.com/repos/s3364859/CPT331/releases{/id}","deployments_url":"https://api.github.com/repos/s3364859/CPT331/deployments","created_at":"2016-09-05T09:26:26Z","updated_at":"2016-10-23T00:17:04Z","pushed_at":"2016-10-30T08:58:09Z","git_url":"git://github.com/s3364859/CPT331.git","ssh_url":"git@github.com:s3364859/CPT331.git","clone_url":"https://github.com/s3364859/CPT331.git","svn_url":"https://github.com/s3364859/CPT331","homepage":"","size":6392,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/s3364859/CPT331/pulls/33"},"html":{"href":"https://github.com/s3364859/CPT331/pull/33"},"issue":{"href":"https://api.github.com/repos/s3364859/CPT331/issues/33"},"comments":{"href":"https://api.github.com/repos/s3364859/CPT331/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/s3364859/CPT331/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/s3364859/CPT331/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/s3364859/CPT331/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/s3364859/CPT331/statuses/33fc6ed3a77956d75d709f3fc73caad7821f5f75"}}}}
{"actor":{"display_login":"6nop"}}