public ActionResult <IEnumerable <BlogTagViewModel> > GetBlogsByTagId(int id) { try { return(Ok(_bs.GetBlogsByTagId(id))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <IEnumerable <TagBlogViewModel> > getBlogsByTagId(int id) { try { return(Ok(_bs.GetBlogsByTagId(id))); } catch (System.Exception err) { return(BadRequest(err.Message)); } }
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)); } }