예제 #1
0
        public async Task <ActionResult> Get(int id)
        {
            _logger.LogInformation(0, "Get Trace by id: {0}", id);

            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            var trace = await _traceRepository.GetByIdAsync(id);

            if (trace == null)
            {
                return(this.NotFound());
            }
            else
            {
                return(this.Ok(trace));
            }
        }