示例#1
0
        public CountryEntity Create(EmployeeEntity EmployeeEntity, CountryEntity CountryEntity)
        {
            if (CountryEntity == null)
            {
                throw new NotFoundException();
            }
            if (!CountryValidator.ValidateCreate(CountryEntity))
            {
                throw new BadRequestException(CountryEntity);
            }
            Country Country = new Country(CountryEntity);

            UnitOfWork.CountryRepository.Add(Country);
            UnitOfWork.Complete();
            return(Get(EmployeeEntity, Country.Id));
        }