예제 #1
0
        public Citizen Register(RegisterInfo info)
        {
            var country = countriesRepository.GetById(info.CountryID);

            if (country == null)
            {
                throw new Exception("Country not found");
            }
            var region = regionsRepository.GetById(info.RegionID);

            if (region == null)
            {
                throw new Exception("Region not found");
            }

            Citizen citizen = citizensService.CreateCitizen(info);

            return(citizen);
        }