public PaginatedList <AutomationExecutionViewModel> View(
            [FromQuery(Name = "$filter")] string filter   = "",
            [FromQuery(Name = "$orderby")] string orderBy = "",
            [FromQuery(Name = "$top")] int top            = 100,
            [FromQuery(Name = "$skip")] int skip          = 0
            )
        {
            ODataHelper <AutomationExecutionViewModel> oDataHelper = new ODataHelper <AutomationExecutionViewModel>();

            var oData = oDataHelper.GetOData(HttpContext, oDataHelper);

            return(automationExecutionLogManager.GetAutomationAndAgentNames(oData.Predicate, oData.PropertyName, oData.Direction, oData.Skip, oData.Take));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> View(
            [FromQuery(Name = "$filter")] string filter   = "",
            [FromQuery(Name = "$orderby")] string orderBy = "",
            [FromQuery(Name = "$top")] int top            = 100,
            [FromQuery(Name = "$skip")] int skip          = 0
            )
        {
            try
            {
                ODataHelper <AutomationExecutionViewModel> oDataHelper = new ODataHelper <AutomationExecutionViewModel>();
                var oData = oDataHelper.GetOData(HttpContext, oDataHelper);

                return(Ok(_automationExecutionLogManager.GetAutomationAndAgentNames(oData.Predicate, oData.PropertyName, oData.Direction, oData.Skip, oData.Take)));
            }
            catch (Exception ex)
            {
                return(ex.GetActionResult());
            }
        }