public async Task <List <PlaceAttributes> > GetInsideOutsideData(LocationAttributes Position, String DeparturePlace, String ArrivalDateTime, String DepartureDateTime, String PointOfInterest) { List <PlaceAttributes> OutsideData = await _getOutsideData.GetAllData(DeparturePlace, ArrivalDateTime, DepartureDateTime, PointOfInterest); List <PlaceAttributes> InsideData = await _getInsideData.GetData(Position, DeparturePlace, ArrivalDateTime, DepartureDateTime, PointOfInterest); for (int index = 0; index < InsideData.Count; index++) { OutsideData.Add(InsideData[index]); } return(OutsideData); }
public async Task <IActionResult> GetOutsideData(String DeparturePlace, String ArrivalDateTime, String DepartureDateTime, String PointOfInterest) { var Data = await _getAllData.GetAllData(DeparturePlace, ArrivalDateTime, DepartureDateTime, PointOfInterest); if (Data != null) { return(Ok(Data)); } else { return(BadRequest("Data Not Found")); } }
public async Task <IActionResult> Get() { //GetLatitudeLongitude PositionObject = new GetLatitudeLongitude(); var Data = await _getAllData.GetAllData(); if (Data != null) { return(Ok(Data)); } else { return(BadRequest("Data Not Found")); } }
public async Task <IActionResult> GetOutsideData(String DeparturePlace, String ArrivalDateTime, String DepartureDateTime, String PointOfInterest, int LayoverTime) { //string AllDataKey = DeparturePlace + PointOfInterest; string FilterKey = DeparturePlace + PointOfInterest + LayoverTime; //var Data = _allDataExchangethroughRedisCache.GetDataFromCache(AllDataKey) == null ? // await _getAllData.GetAllData(DeparturePlace, ArrivalDateTime, DepartureDateTime, PointOfInterest) : // _allDataExchangethroughRedisCache.GetDataFromCache(AllDataKey); var FilterData = _allDataExchangethroughRedisCache.GetDataFromCache(FilterKey) == null ? await GetFilterData(await _getAllData.GetAllData(DeparturePlace, ArrivalDateTime, DepartureDateTime, PointOfInterest), DeparturePlace, LayoverTime, FilterKey) : _allDataExchangethroughRedisCache.GetDataFromCache(FilterKey); if (FilterData != null) { return(Ok(FilterData)); } else { return(BadRequest("Data Not Found")); } }