コード例 #1
0
 public IActionResult Get(string cultureCode, Guid contentId)
 {
     try
     {
         var result = _pageContentRepository.GetTranslations(contentId, cultureCode);
         if (result != null)
         {
             return(Ok(result));
         }
         return(NotFound());
     }
     catch (Exception ex)
     {
         _logger.LogError(string.Format("Error occured while getting page content translation, contentId: {0}, cultureCode: {1}", contentId, cultureCode), ex);
         return(new StatusCodeResult(StatusCodes.Status500InternalServerError));
     }
 }