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); }
public ActionResult <List <Taxonomy> > GetForVisitor() { return(_taxonomyService.Get()); }