Ejemplo n.º 1
0
        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}"));
            }));
        }
Ejemplo n.º 2
0
 public Task <TSaga> Load(Guid correlationId)
 {
     return(_repositoryContextFactory.Execute(context => context.Load(correlationId)));
 }