public IEnumerable <CountriesDTO> GetCountryService() { return(countriesRepository.GetAll().Select(x => new CountriesDTO { CountryId = x.CountryId, CountryName = x.CountryName }).ToList()); }
public void GetAllCountries() { using (var db = new ExampleContext(Connection)) { ICountriesRepository repository = new CountriesRepository(db); var countries = repository.GetAll(); Assert.That(countries.Count(), Is.EqualTo(3)); } }