public ICountry GetCountry(int id) { var countryDataModel = _countryDataManager.GetCountry(id); if (countryDataModel == null) { throw new CountryNotFoundException(); } var country = new CountryModel(countryDataModel, _countryDataManager); return(country); }
public ICountry GetCountry(TourTypesEnum tourType, string countryUrl) { var tourTypeData = TourTypesEnumConverter.ConvertToDbValue(tourType); var countryDataModel = _countryDataManager.GetCountry(tourTypeData, countryUrl); if (countryDataModel == null) { throw new CountryNotFoundException(); } var country = new CountryModel(countryDataModel, _countryDataManager); return(country); }
public ICountry CreateCountry( string name, string urlName, TourTypesEnum category, decimal threeStarsPrice, decimal fourStarsPrice, decimal fiveStarsPrice, string description, string pageContent) { var country = new CountryModel( _countryDataManager, name, urlName, category, threeStarsPrice, fourStarsPrice, fiveStarsPrice, description, pageContent ); return(country); }