public async Task <IActionResult> GetSegmentIJAsync(int i, int j) { var query = queryFactory.CreateSegmentQuery(i, j); try { return(Json(await query.GetJsonAsync())); } catch (NotFoundException) { return(NotFound()); } }