public Task <ObjectResult> GetAsync([FromRoute(Name = "id")] int id, [FromQuery] GetValuesRequest value) { return(DoAsync(async() => { _log.Info("info"); _log.Debug("Debug"); _log.Error("Error"); _log.Warn("Warn"); throw new ServiceException(AllServiceErrors.TestError.WithMessageParameters("Billy")); //throw new Exception("test Exception"); await _distributedCache.SetAsync("hello", Encoding.UTF8.GetBytes("world22222"), new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromMinutes(5))); var _ = await _distributedCache.GetAsync("hello"); return new GetValuesResponse { Details = _mapper.Map <DetailDto>(_valuesRepository.GetDetail()), //new DetailDto {DetailInt = 1, DetailStr = "dsf"}, Result = _valuesRepository.GetValues(id) }; })); //return new string[] { "value1", "value2" }; }