EPiServer.Reference.Commerce.Site.Infrastructure.Facades.CountryManagerFacade.GetCountryByCountryCode C# (CSharp) Method

GetCountryByCountryCode() public method

public GetCountryByCountryCode ( string countryCode ) : CountryDto.CountryRow
countryCode string
return CountryDto.CountryRow
        public virtual CountryDto.CountryRow GetCountryByCountryCode(string countryCode)
        {
            CountryDto dataset = CountryManager.GetCountry(countryCode, false);
            CountryDto.CountryDataTable table = dataset.Country;

            return (table.Rows.Count == 1) ? table.Rows[0] as CountryDto.CountryRow : null;
        }
    }