Exemple #1
0
        public static CountryContract ConvertToCountryContract(Country country)
        {
            if (country == null)
            {
                return(null);
            }

            CountryContract contractCountry = new CountryContract()
            {
                CountryID = country.CountryID, Name = country.Name,
            };

            return(contractCountry);
        }
Exemple #2
0
        public static Country ConvertToCountryEntity(CountryContract country)
        {
            if (country == null)
            {
                return(null);
            }
            Country entityCountry = new Country()
            {
                CountryID = country.CountryID,
                Name      = country.Name,
            };

            return(entityCountry);
        }