public async Task <IActionResult> BusStopSequence(int busId) { var stops = await busService.GetBusStops(busId); if (stops == null) { return(BadRequest(new ApiError("No bus stops info for the bus"))); } Collection <BusStopViewModel> busStops = new Collection <BusStopViewModel>() { Self = LinkGenerator.ToCollection(RouteNames.StopSequence), Value = stops.ToArray() }; return(Ok(busStops)); }