private void LoadPetInfo(DTOPet dtoPet)
        {
            if (dtoPet.Breed != null && !string.IsNullOrWhiteSpace(dtoPet.Breed.Id))
            {
                var getBreedByIdResult = _breedDomain.GetById(dtoPet.Breed.Id);
                if (getBreedByIdResult.Code == 200)
                {
                    dtoPet.Breed = getBreedByIdResult.Data;
                }
            }

            if (dtoPet.FurColor != null && !string.IsNullOrWhiteSpace(dtoPet.FurColor.Id))
            {
                var getFurColorByIdResult = _furColorDomain.GetById(dtoPet.FurColor.Id);
                if (getFurColorByIdResult.Code == 200)
                {
                    dtoPet.FurColor = getFurColorByIdResult.Data;
                }
            }

            if (dtoPet.Coat != null && !string.IsNullOrWhiteSpace(dtoPet.Coat.Id))
            {
                var getCoatByIdResult = _coatDomain.GetById(dtoPet.Coat.Id);
                if (getCoatByIdResult.Code == 200)
                {
                    dtoPet.Coat = getCoatByIdResult.Data;
                }
            }
        }
Exemplo n.º 2
0
 public DTOResponse <DTOBreed> GetById(DTOBreed getBreedByIdInfo)
 {
     return(_breedDomain.GetById(getBreedByIdInfo.Id));
 }