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}" : ""; }
public override void AddPostCode(HousingContext.Property property) { var estateAddress = AssociatedAddressList.First(x => x.PropertyId == property.ParentId).AddressId; BuiltAddress.PostCode = estateAddress.PostCode; }
public override void AddStreet(HousingContext.Property property) { var estateAddress = AssociatedAddressList.First(x => x.PropertyId == property.ParentId).AddressId; BuiltAddress.Street = estateAddress.Street; }