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

GetRecent() private method

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