Blog.Web.Api.Controllers.CommentsController.GetByPost C# (CSharp) 메소드

GetByPost() 개인적인 메소드

private GetByPost ( int postId ) : IHttpActionResult
postId int
리턴 IHttpActionResult
        public IHttpActionResult GetByPost(int postId)
        {
            try
            {
                var comments = _service.GetByPostId(postId);
                return Ok(comments);
            }
            catch (Exception ex)
            {
                _errorSignaler.SignalFromCurrentContext(ex);
                return BadRequest();
            }
        }