常用方法
常用方法
常用方法
常用方法
public bool Execute(string cityName, out City c) { var cities = gateway.LoadAllCities(); foreach (var city in cities) { if (city.Name == cityName) { c = null; return(false); } } c = new City(cityName); gateway.InsertCity(c); return(true); }