コード例 #1
0
 public ActionResult <IEnumerable <Comment> > GetCommentsByBlogId(int id)
 {
     try
     {
         IEnumerable <Comment> comments = _service.GetCommentsByBlogId(id);
         return(Ok(comments));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }