Esempio n. 1
0
 public static CountryDTO ToCountryDTO(this CountryApiModel country)
 {
     if (country == null)
     {
         return(null);
     }
     return(new CountryDTO
     {
         Capital = country.Capital,
         CommonName = country.CommonName,
         CountryCode = country.CountryCode,
         CountryCode3 = country.CountryCode3,
         CountryNumber = country.CountryNumber,
         CountrySubType = country.CountrySubType,
         CountryType = country.CountryType,
         CurrencyCode = country.CurrencyCode,
         CurrencyName = country.CurrencyName,
         Flags = country.Flags,
         FormalName = country.FormalName,
         Id = country.Id,
         InternetCountryCode = country.InternetCountryCode,
         IsDeleted = country.IsDeleted,
         IsPublished = country.IsPublished,
         SortOrder = country.SortOrder,
         Sovereignty = country.Sovereignty,
         TelephoneCode = country.TelephoneCode
     });
 }
Esempio n. 2
0
        public CountryApiModel Get(int id)
        {
            CountryBusinessLogic _business = new CountryBusinessLogic();
            CountryApiModel      country   = ApiTranslators.Translate <CountryDTO, CountryApiModel>(_business.GetById(id));

            return(country);
        }
Esempio n. 3
0
 internal ApiResultCountryApiModel(CountryApiModel data)
 {
     Data = data;
 }