public Location amadeusLocationToLocation(AmadeusLocation aml) { return(new Location { Code = aml.Code, City = aml.City, Img = aml.Img }); }
public LocationDTO(AmadeusLocation location) { IataCode = location.IataCode; Type = location.LocationType; Name = location.Name; DetailedName = location.DetailedName; CityName = location.Address?.CityName ?? "Unknown"; CountryName = location.Address?.CountryName ?? "Unknown"; }
public LocationData() { this.locations = new List <AmadeusLocation>(); JArray json_loc = JArray.Parse(File.ReadAllText("locations.json")); foreach (dynamic dyn_loc in json_loc) { AmadeusLocation loc = new AmadeusLocation(dyn_loc); this.locations.Add(loc); } }