public IHttpActionResult GetCountries(string code) { CountryDatabase countryDatabase = new CountryDatabase(); Country country = countryDatabase.Countries.FirstOrDefault((c) => c.ISO == code); if (country == null) { return NotFound(); } return Ok(country); }
public IEnumerable<Country> GetCountries() { CountryDatabase countryDatabase = new CountryDatabase(); return countryDatabase.Countries; }