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); } } } } }
public SitterDetailModel() { Sitter = new SitterModel(); PetImages = new List <PetImageModel>(); }