예제 #1
0
 public string FindCityIdByName(string name)
 {
     return
         ((from city in Cities
           where VoiceCommandInputComparer.UmlautsIgnoringEqual(city.Name, name)
           select city.Id)
          .FirstOrDefault());
 }
예제 #2
0
        public string FindParkingLotIdByNameAndCityId(string cityId, string name)
        {
            var city = Cities.FirstOrDefault(x => x.Id.Equals(cityId));

            return(city?.ParkingLots.FirstOrDefault(x => VoiceCommandInputComparer.UmlautsIgnoringEqual(x.Name, name))?.Id);
        }