コード例 #1
0
        public SitterDetailModel(Sitter sitter)
        {
            Sitter    = new SitterModel();
            PetImages = new List <PetImageModel>();

            this.Sitter = new SitterModel(sitter);

            if (sitter.User.Pets != null)
            {
                foreach (var pet in sitter.User.Pets)
                {
                    if (pet.PetImages != null)
                    {
                        foreach (var petImage in pet.PetImages)
                        {
                            var petImageModel = new PetImageModel(petImage);
                            this.PetImages.Add(petImageModel);
                        }
                    }
                }
            }
        }
コード例 #2
0
 public SitterDetailModel()
 {
     Sitter    = new SitterModel();
     PetImages = new List <PetImageModel>();
 }