Example #1
0
        public IActionResult GetUserOperationsByTimeSeries([FromRoute] string seriesId)
        {
            List <UserAnalyticsOperation> operations =
                _analyticsService.GetUserAnalyticsOperationsBySeriesId(seriesId);

            if (operations == null)
            {
                return(NotFound());
            }

            List <UserAnalyticsOperationModel> models = operations.Select(operation => new UserAnalyticsOperationModel
            {
                Id            = operation.Id.ToString(),
                OperationName = operation.OperationName,
                Status        = operation.Status.ToString(),
                TimeSeriesId  = operation.TimeSeriesId
            })
                                                        .ToList();

            return(Ok(models));
        }