コード例 #1
0
        //[ResponseType(typeof(LaboratoryModel))]
        public IHttpActionResult GetByKeyword(string keyword)
        {
            var labList = _laboratoryService.GetByKeyword(keyword);

            if (labList.ToList().Count() == 0)
            {
                return(NotFound());
            }

            List <LaboratoryAPIModel> result = new List <LaboratoryAPIModel>();

            labList.ToList().ForEach(l => result.Add(_laboratoryAPIMapper.Map(l)));

            return(Content(HttpStatusCode.OK, result));
        }