コード例 #1
0
        public ActionResult <AnimalDetail> Get(string id)
        {
            var animal     = _animalService.Get(id);
            var taxonomyId = animal.TaxonomyId;
            var Taxonomy   = _taxonomyService.Get(taxonomyId);

            var animalDetail = new AnimalDetail
            {
                Id             = animal.Id,
                ThaiName       = animal.ThaiName,
                CommonName     = animal.CommonName,
                ScientificName = animal.ScientificName,
                Description    = animal.Description,
                TaxonomyId     = Taxonomy,
                BoneImgPath    = animal.BoneImgPath,
                ImgPath        = animal.ImgPath,
            };

            return(animalDetail);
        }
コード例 #2
0
 public ActionResult <List <Taxonomy> > GetForVisitor()
 {
     return(_taxonomyService.Get());
 }