示例#1
0
 public static City KontrolliereMitDatenbank(City stadt, List<City> städte)
 {
     foreach (var city in städte)
     {
         if (stadt.PostalCode.Equals(city.PostalCode) && !stadt.Name.Equals(city.Name) ||
             !stadt.PostalCode.Equals(city.PostalCode) && stadt.Name.Equals(city.Name))
         {
             throw new WrongCityPostalCodeCombination("Stadt mit PLZ: "+city.PostalCode+" Name: "+city.Name+" ist bereits vorhanden.");
         }
         if (stadt.PostalCode == city.PostalCode && stadt.Name.Equals(city.Name)) return city;
     }
     return stadt;
 }
示例#2
0
        private City GetCorrespondingItemFromDatabase(City city)

        {
            return null;
        }
示例#3
0
 public Address()
 {
     street = "";
     streetNumber = "";
     city = new City();
 }