コード例 #1
0
        public IActionResult EditPost([FromRoute] int?projectId, [FromRoute] int?postId)
        {
            var editpost = new EditPostVM()
            {
                Post    = _postservices.FindPostById(projectId.Value, postId.Value),
                Project = _projectservices.FindMyProjectById(projectId.Value)
            };

            return(View(editpost));
        }
コード例 #2
0
 public void Throw_ArgumentNullException_When_PostId_IsNotFound()
 {
     //Act & Assert
     Assert.ThrowsException <ArgumentNullException>(() => postServices.FindPostById(100));
 }