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

GetPopular() private method

private GetPopular ( ) : IHttpActionResult
return IHttpActionResult
        public IHttpActionResult GetPopular()
        {
            try
            {
                var posts = _postsSvc.GetPopularPosts(
                    Convert.ToInt32(_configurationHelper.GetAppSettings("DefaultPostsThreshold"))) ??
                    new List<Post>();
                return Ok(posts);
            }
            catch (Exception ex)
            {
                _errorSignaler.SignalFromCurrentContext(ex);
                return BadRequest();
            }
        }