private async Task SaveResponseData(string response = "") { await Task.Run(async() => { await _logger.LogInformation($"\nRESPONSE FROM TELEGRAM \n{response}"); if (!response.Contains("error")) { var responseDto = JsonConvert.DeserializeObject <ResponseDto>(response); await _logger.LogResponseFromTelegram(responseDto); if (responseDto != null) { var responseForCreation = _mapper.Map <Response>(responseDto); await _logger.LogResponseFromTelegram(responseForCreation); _dataRepository.Add(responseForCreation); await _dataRepository.SaveAllAsync(); } } }); }