Open sarvancse1987 opened 2 weeks ago
Hello @sarvancse1987 could you share more information about the actual problem you're facing, any error you observed, expected and actual behaviour, etc?
Hi @habbes , Thank you so much, to here the issue.
[EnableQuery( AllowedQueryOptions = AllowedQueryOptions.None, HandleReferenceNavigationPropertyExpandFilter = false, HandleNullPropagation = HandleNullPropagationOption.False, AllowedFunctions = AllowedFunctions.None )] [SwaggerOperationFilter(typeof(ODataOperationFilter))] [SwaggerOperation( Summary = "Get ValueChain Events History", Description = "
Get VC events history data for the specified filter condition.
", OperationId = "GetEventsHistory", Tags = new[] { "EventsHistory" } )] [HttpGet("api/History/Get")] [ProducesResponseType(typeof(IEnumerable var sql = _translator.Translate(options, TranslateOptions.ALL);
var response = await _eventsHistoryService.GetEventsAsync<VCEventResponse>(sql, continuationToken);
**var queryResult = new CosmosQueryResult<VCEventResponse>
{
Items = response.Items,
ContinuationToken = Uri.EscapeDataString(response.ContinuationToken),
TotalRecords = response.TotalRecords
};
return Ok(queryResult);**
}
catch (Exception ex)
{
_logger.LogError("Exception occurred while getting events history data - " + ex.Message);
throw new Exception("Exception occurred while getting events history data - " + ex.Message);
}
}
I would like to return the response with Odata features, and examples (select, filter, top, skip). Presently in this method, the features (select, filter, top, skip) will not support
var oDataResponse = new ODataResponse
{
Items = transformedResults as IEnumerable,
Count = response.TotalRecords,
NextLink = response.ContinuationToken
};
return Ok(responses);
needs to return the cosmodb continuationtoken for fetch the next set of records