コード例 #1
0
ファイル: TagsController.cs プロジェクト: mceman2/BlogPost
        public ActionResult Get()
        {
            TagDTO tagDto = new TagDTO();

            tagDto.Tags = _tagsService.GetAllTags();
            return(Ok(tagDto));
        }
コード例 #2
0
 public ActionResult GetTags()
 {
     try
     {
         return(new JsonResult(new
         {
             success = new
             {
                 tags = _tagsService.GetAllTags().ToArray()
             }
         }));
     }
     catch (Exception ex)
     {
         _log.LogError(ex, "An unexpected error occurred.");
         return(Responses.UnexpectedError());
     }
 }
コード例 #3
0
ファイル: TagsController.cs プロジェクト: drontik/maybe
 public IHttpActionResult GetAllTags()
 {
     return(Ok(tagService.GetAllTags()));
 }