コード例 #1
0
 public ActionResult <IEnumerable <BlogTagViewModel> > GetBlogsByTagId(int id)
 {
     try
     {
         return(Ok(_bs.GetBlogsByTagId(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
コード例 #2
0
 public ActionResult <IEnumerable <TagBlogViewModel> > getBlogsByTagId(int id)
 {
     try
     {
         return(Ok(_bs.GetBlogsByTagId(id)));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
コード例 #3
0
 public ActionResult <IEnumerable <TagBlogViewModel> > GetBlogsByTagId(int id)
 {
     try
     {
         //NOTE We could go request to get the tag, and make sure it exists right here by using the tag service.
         return(Ok(_bs.GetBlogsByTagId(id)));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }