public void Log(Exception e, ISystemProcessOperationThirdPartyDataRequest request) { if (request == null) { this.Log(e); return; } var dto = new ExceptionDto { ExceptionMessage = e.Message, InnerExceptionMessage = e.InnerException?.Message, StackTrace = e.StackTrace, SystemProcessId = request.SystemProcessId, SystemProcessOperationId = request.SystemProcessOperationId, SystemProcessOperationThirdPartyDataRequestId = request.Id }; this._exceptionRepository.Save(dto); }
public async Task Create(ISystemProcessOperationThirdPartyDataRequest entity) { if (entity == null) { return; } lock (this._lock) { try { this._logger.LogInformation($"SystemProcessOperationDistributeRuleRepository SAVING {entity}"); using (var dbConnection = this._dbConnectionFactory.BuildConn()) using (var conn = dbConnection.QuerySingleAsync <int>(CreateSql, entity)) { entity.Id = conn.Result; } } catch (Exception e) { this._logger.LogError(e, $"System Process Operation Distribute Rule Repository Create Method For {entity.Id} {entity.SystemProcessOperationId}."); } } }
public void StartEvent(ISystemProcessOperationThirdPartyDataRequest request) { this._request = request; this._requestRepository?.Create(request); }