Beispiel #1
0
        //================================================================================
        private void validateVesselInCompanyExistance(DomainObjects.VesselInCompany vesselInCompany, Company introducer, ICompanyDomainService companyDomainService)
        {
            var vessels = companyDomainService.GetCompanyVessels(introducer.Id);

            if (vessels.Count(v => v.Id == vesselInCompany.Id) != 1)
                throw new BusinessRuleException("", "The vessel is not assigned to company.");
        }