public static OwnerAddress GetAddressById(int AddressId) { OwnerAddress ownerAddress = new OwnerAddress(); var Data = OwnerService.GetOwnerAddressById(AddressId); if (Data != null) { ownerAddress.Id = Data.Id; ownerAddress.Street1 = Data.Street1; ownerAddress.Street2 = Data.Street2; ownerAddress.City = Data.City; ownerAddress.PostCode = Data.PostCode; ownerAddress.StateId = Data.StateId; } return(ownerAddress); }