Example #1
0
        public CountryEntity Update(EmployeeEntity EmployeeEntity, Guid CountryId, CountryEntity CountryEntity)
        {
            CountryEntity.Id = CountryId;
            if (!CountryValidator.ValidateUpdate(CountryEntity))
            {
                throw new BadRequestException(CountryEntity);
            }
            Country Country = new Country(CountryEntity);

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