public virtual IEnumerable<Market> GetMarkets()
        {
            var belgium = new Country("Belgium", "BE");
            var antwerp = new City("Antwerp", "2000", belgium);

            yield return new Market(new Address("Groenplaats", antwerp));
            yield return new Market(new Address("Sint-Jansplein", antwerp));
        }
Exemplo n.º 2
0
 public City(string name, string postalCode, Country country)
 {
     _name = name;
     _postalCode = postalCode;
     _country = country;
 }