private void AddCity(string countrycode = "") { string name = CLIHelper.GetString("Name of the city:"); string code = CLIHelper.GetString("Country code:"); string district = CLIHelper.GetString($"District {name} is in:"); int population = CLIHelper.GetInteger($"Population of {name}:"); City city = new City { CountryCode = code, Name = name, District = district, Population = population }; if (String.IsNullOrEmpty(countrycode)) { cityDAO.AddCity(city); } else { cityDAO.AddCityAsCapital(city, countrycode); } Console.WriteLine("City added."); }