public PetPublicProfileViewModel GetPetPublicProfileViewModel(PetLostDetails data) { var model = new PetPublicProfileViewModel(); model.PetInfo = GetPetInfoViewModel(data.PetInfo); model.OwnersInfo = data.OwnersInfo.ConvertAll(x => GetOwnerDetails(x)); return(model); }
public PetPublicProfileViewModel GetPetPublicProfileViewModel(PetAlertDetails data) { var model = new PetPublicProfileViewModel(); model.PetInfo = GetPetInfoViewModel(data.PetInfo); model.OwnersInfo = data.OwnersInfo.ConvertAll(x => GetOwnerDetails(x)); if (string.IsNullOrEmpty(model.PetInfo.ProfileImageUrl) && model.PetInfo.Images.Count > 0) { model.PetInfo.ProfileImageUrl = model.PetInfo.Images[0]; } return(model); }