public IActionResult GetAricleByUserName(string userName) { try { var Result = _articleData.FindArticlesByUserName(userName, true); if (Result.Count > 0) { var model = _mapper.Map <List <PublicArticleDisplayModel> >(Result); return(Ok(model)); } return(NotFound()); } catch (Exception ex) { _apiErrorHandler.CreateError(ex.Source, ex.StackTrace, ex.Message); } return(StatusCode(500)); }