public Task Save(IEvent @event, CancellationToken cancellationToken = default(CancellationToken)) { var eventLogEntry = new IntegrationEventLogEntry(@event); _integrationEventLogContext.IntegrationEventLogs.Add(eventLogEntry); _integrationEventLogContext.SaveChanges(); return(Task.CompletedTask); }
public Task Save(IEnumerable <IEvent> events, CancellationToken cancellationToken = default(CancellationToken)) { foreach (var @event in events) { var eventLogEntry = new IntegrationEventLogEntry(@event); _integrationEventLogContext.IntegrationEventLogs.Add(eventLogEntry); } ; _integrationEventLogContext.SaveChanges(); return(Task.CompletedTask); }