public Task <TSaga> Load(Guid correlationId) { return(_repositoryContextFactory.Execute(context => { if (context is MongoDbSagaRepositoryContext <TSaga> mongoDbSagaRepositoryContext) { return mongoDbSagaRepositoryContext.Load(correlationId); } return TaskUtil.Faulted <TSaga>(new NotSupportedException($"{nameof(Load)} is not supported for {TypeMetadataCache<TSaga>.ShortName}")); })); }
public Task <TSaga> Load(Guid correlationId) { return(_repositoryContextFactory.Execute(context => context.Load(correlationId))); }