public void Store(UncommittedEventStream eventStream) { Parallel.ForEach <Guid>( eventStream.Select(es => es.EventSourceId).Distinct(), (eventSourceId) => SaveEvents(eventSourceId, eventStream.Where(es => es.EventSourceId == eventSourceId)) ); }
public void Store(UncommittedEventStream eventStream) { Parallel.ForEach<Guid>( eventStream.Select(es => es.EventSourceId).Distinct(), (eventSourceId) => SaveEvents(eventSourceId, eventStream.Where(es => es.EventSourceId == eventSourceId)) ); }