Ejemplo n.º 1
0
        public async Task <PagedResult <Audit> > ReadAuditPaged(ODataQueryOptions <Audit> options, CancellationToken ctk = default)
        {
            var validations = new RavenDefaultODataValidationSettings()
            {
                AllowedOrderByProperties =
                {
                    "LastUpdatedUtc"
                },
            };

            var res = await _session.Query <Audit>().GetPagedWithODataOptions <Audit>(options, validations);

            return(res);
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Get(ODataQueryOptions <Audit> options)
        {
            var validations = new RavenDefaultODataValidationSettings()
            {
                AllowedOrderByProperties =
                {
                    "LastUpdatedUtc"
                },
            };

            var res = await _session.Query <Audit>().GetPagedWithODataOptions <Audit>(options, validations);

            return(Ok(res));
        }