public IEnumerable <CountriesDTO> GetCountryService()
 {
     return(countriesRepository.GetAll().Select(x => new CountriesDTO
     {
         CountryId = x.CountryId,
         CountryName = x.CountryName
     }).ToList());
 }
예제 #2
0
 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));
     }
 }