Blog.Web.Api.Controllers.PostsController.GetRecent C# (CSharp) 메소드

GetRecent() 개인적인 메소드

private GetRecent ( ) : IHttpActionResult
리턴 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();
            }
        }