public RealEstateListingPresentationModel(IRealEstateListingView view, IRealEstateService realEstateService) { RealEstate realEstate = realEstateService.GetRealEstate(); Address = realEstate.Address; County = realEstate.County; State = realEstate.State; Price = realEstate.Price; ZipCode = realEstate.ZipCode; Bedrooms = realEstate.Bedrooms; Bathrooms = realEstate.Bathrooms; GarageSize = realEstate.GarageSize; Acreage = realEstate.Acreage; Description = realEstate.Description; PropertyImage = realEstate.Image; this.Sections = new ObservableCollection<PieSection>(); foreach(var matching in realEstate.CriteriaMatching) { this.Sections.Add(new PieSection() { SectionWeight = matching.CriteriaWeight, MatchingPercentage = matching.CriteriaMatchingPercentage, Description = matching.FeatureDescription }); } this.View = view; this.View.SetModel(this); }
public RealEstateListingPresentationModel(IRealEstateListingView view, IRealEstateService realEstateService) { RealEstate realEstate = realEstateService.GetRealEstate(); Address = realEstate.Address; County = realEstate.County; State = realEstate.State; Price = realEstate.Price; ZipCode = realEstate.ZipCode; Bedrooms = realEstate.Bedrooms; Bathrooms = realEstate.Bathrooms; GarageSize = realEstate.GarageSize; Acreage = realEstate.Acreage; Description = realEstate.Description; PropertyImage = realEstate.Image; this.Sections = new ObservableCollection <PieSection>(); foreach (var matching in realEstate.CriteriaMatching) { this.Sections.Add(new PieSection() { SectionWeight = matching.CriteriaWeight, MatchingPercentage = matching.CriteriaMatchingPercentage, Description = matching.FeatureDescription }); } this.View = view; this.View.SetModel(this); }