コード例 #1
0
ファイル: HomeController.cs プロジェクト: raecharles/SWAPI
        public ActionResult GetStarships(string ids = "")
        {
            List <Starship>    ships = _starWarsService.GetStarships().Result;
            StarshipsJsonModel model = _viewMapperHelper.StarshipsMatchedMapper(ships, ids);
            var json = new JsonResult(model);

            json.StatusCode  = 200;
            json.ContentType = "application/json";
            return(json);
        }