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

Get() private method

private Get ( int postId ) : IHttpActionResult
postId int
return IHttpActionResult
        public IHttpActionResult Get(int postId)
        {
            try
            {
                var post = _postsSvc.GetPost(postId) ?? new Post();
                UpdateViewCount(postId);
                
                return Ok(post);
            }
            catch (Exception ex)
            {
                _errorSignaler.SignalFromCurrentContext(ex);
                return BadRequest();
            }
        }

Same methods

PostsController::Get ( string tagName ) : IHttpActionResult