예제 #1
0
        public override void AddComposite(HousingContext.Property property)
        {
            var estateAddress = AssociatedAddressList.First(x => x.PropertyId == property.ParentId).AddressId;

            BuiltAddress.Composite  = $"{BuiltAddress.BuildingName}";
            BuiltAddress.Composite +=
                !string.IsNullOrEmpty(estateAddress.Street) ? $"\n{estateAddress.StreetNumber} {estateAddress.Street}" : "";
            BuiltAddress.Composite +=
                !string.IsNullOrEmpty(estateAddress.Area) ? $"\n{estateAddress.Area}" : "";
            BuiltAddress.Composite +=
                !string.IsNullOrEmpty(estateAddress.City) ? $"\n{estateAddress.City}" : "";
            BuiltAddress.Composite +=
                !string.IsNullOrEmpty(estateAddress.County) ? $"\n{estateAddress.County}" : "";
            BuiltAddress.Composite +=
                !string.IsNullOrEmpty(estateAddress.PostCode) ? $"\n{estateAddress.PostCode}" : "";
        }
예제 #2
0
        public override void AddPostCode(HousingContext.Property property)
        {
            var estateAddress = AssociatedAddressList.First(x => x.PropertyId == property.ParentId).AddressId;

            BuiltAddress.PostCode = estateAddress.PostCode;
        }
예제 #3
0
        public override void AddStreet(HousingContext.Property property)
        {
            var estateAddress = AssociatedAddressList.First(x => x.PropertyId == property.ParentId).AddressId;

            BuiltAddress.Street = estateAddress.Street;
        }