Example #1
0
        public IShipCountry BuildEntity(ShipCountryDto dto)
        {
            var country = dto.CountryCode.Equals(Constants.CountryCodes.EverywhereElse) ?
                          new Country(Constants.CountryCodes.EverywhereElse, new List <IProvince>()) :
                          _storeSettingService.GetCountryByCode(dto.CountryCode);

            var shipCountry = new ShipCountry(dto.CatalogKey, country)
            {
                Key        = dto.Key,
                UpdateDate = dto.UpdateDate,
                CreateDate = dto.CreateDate
            };

            shipCountry.ResetDirtyProperties();

            return(shipCountry);
        }