示例#1
0
        private InstallationDomain FindReferences(InstallationEntity installation)
        {
            if (installation == null)
            {
                return(null);
            }
            var location = _locationRepository.FindById(installation.LocationRef) ?? throw new ArgumentException("Location is null");
            var address  = _addressRepository.FindById(installation.AddressRef) ?? throw new ArgumentException("Address is null");
            var sponsor  = _sponsorRepository.FindById(installation.SponsorRef) ?? throw new ActivationException("Sponsor is null");

            return(installation.toDomain(location, address, sponsor));
        }