コード例 #1
0
        private async Task <List <DataSet> > PopulateReportCache()
        
    {
                List <DataSet> reports = await _service.GetData(ServiceUrl, RequestUri, out result);

                _logger.LogInformation($"Loaded {reports.Count} report(s)");
                return reports.ToList(); //I would have guessed it returns out parameter result ...

            
    }
コード例 #2
0
    public IHttpActionResult Get(int id)
    {
        if (id < 0)
        {
            return(BadRequest("Some error message"));
        }

        var data = _service.GetData(id);

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

        return(Ok(data));
    }