public async Task <ISaga> Get(Guid id) { ISaga saga = await weakInMemorySagaPersistance.Get(id); if (saga != null) { return(saga); } using (SagaStore sagaStore = new SagaStore(sqlServerConnection, dateTimeProvider, sqlServerOptions)) return(await sagaStore.Get(id)); }
public async Task <ISaga> Get(Guid id) { /*ISaga saga = await weakInMemorySagaPersistance.Get(id); * if (saga != null) * return saga;*/ using (SagaStore sagaStore = new SagaStore(sqlServerConnection, dateTimeProvider, sqlServerOptions)) { var saga = await sagaStore.Get(id); await messageBus. Publish(new SagaAfterRetrivedMessage(saga)); return(saga); } }