示例#1
0
        public HttpResponseMessage GetNewByTagUpgrade(string tag)
        {
            var news = magazineService.GetNewsesByTag(tag);

            if (news == null)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "No se encontró la noticia."));
            }

            return(Request.CreateResponse(HttpStatusCode.OK, TheModelFactory.CreateModelUpgrade(news)));
        }