public async Task Process(InvalidReportReceived @event) { var invalidCaseReport = new InvalidCaseReport(@event.CaseReportId); invalidCaseReport.DataCollectorId = @event.DataCollectorId; invalidCaseReport.Message = @event.Message; invalidCaseReport.ParsingErrorMessage = @event.ErrorMessages; invalidCaseReport.Timestamp = @event.Timestamp; await _invalidCaseReports.Save(invalidCaseReport); }
public void Process(InvalidReportReceived @event) { // Send the invalid report to the DB var invalidCaseReport = new InvalidCaseReport(@event.CaseReportId); //invalidCaseReport.TextMessageId = @event.tex invalidCaseReport.DataCollectorId = @event.DataCollectorId; invalidCaseReport.Origin = @event.Origin; invalidCaseReport.Message = @event.Message; invalidCaseReport.ParsingErrorMessage = @event.ErrorMessages; invalidCaseReport.Timestamp = @event.Timestamp; _invalidCaseReports.Save(invalidCaseReport); }
public void Process(InvalidReportReceived @event) { var invalidCaseReport = new InvalidCaseReport(@event.CaseReportId) { DataCollectorId = @event.DataCollectorId, Message = @event.Message, Origin = @event.Origin, ParsingErrorMessage = @event.ErrorMessages, Timestamp = @event.Timestamp }; _invalidCaseReports.Insert(invalidCaseReport); }
public async Task Save(InvalidCaseReport caseReport) { var filter = Builders <InvalidCaseReport> .Filter.Eq(c => c.Id, caseReport.Id); await _collection.ReplaceOneAsync(filter, caseReport, new UpdateOptions { IsUpsert = true }); }
public void Save(InvalidCaseReport caseReport) { _collection.ReplaceOne(_ => _.Id == caseReport.Id, caseReport, new UpdateOptions { IsUpsert = true }); }