private void AddOrUpdateEvent(ProductionAreaChangedEvent productionAreaChangedEvent) { using (var scope = _serviceProvider.CreateScope()) { var scopedProcessingService = scope.ServiceProvider .GetRequiredService <IProductionAreaChangedEventRepository>(); ProductionAreaChangedEvent evt; if (productionAreaChangedEvent.EventId == Guid.Empty || (evt = scopedProcessingService.Get(productionAreaChangedEvent.EventId)) == null) { scopedProcessingService.Add(productionAreaChangedEvent); } else { evt.MessageSent = true; scopedProcessingService.Update(evt); } scopedProcessingService.Save(); } }
public bool Update(ProductionAreaChangedEvent productChangedEvent) { throw new NotImplementedException(); }