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 }); }
public CountryApiModel Get(int id) { CountryBusinessLogic _business = new CountryBusinessLogic(); CountryApiModel country = ApiTranslators.Translate <CountryDTO, CountryApiModel>(_business.GetById(id)); return(country); }
internal ApiResultCountryApiModel(CountryApiModel data) { Data = data; }