Blog.Web.Api.Controllers.PostsController.GetRelated C# (CSharp) Method

GetRelated() private method

private GetRelated ( int postId ) : IHttpActionResult
postId int
return IHttpActionResult
        public IHttpActionResult GetRelated(int postId)
        {
            try
            {
                var posts = _postsSvc.GetRelatedPosts(postId) ?? new RelatedPosts();
                return Ok(posts);
            }
            catch (Exception ex)
            {
                _errorSignaler.SignalFromCurrentContext(ex);
                return BadRequest();
            }
        }