Skip to content

Commit 9ab7866

Browse files
bugfix: not needed, and also not working for projects that cannot see internals
1 parent bf98d7f commit 9ab7866

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

EntityDb.MongoDb/Extensions/IServiceCollectionExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static void AddMongoDbTransactions<TEntity>(this IServiceCollection servi
2828
{
2929
var connectionString = getConnectionString.Invoke(serviceProvider);
3030

31-
return ActivatorUtilities.CreateInstance<MongoDbTransactionRepositoryFactory<TEntity>>(serviceProvider, connectionString, databaseName);
31+
return new MongoDbTransactionRepositoryFactory<TEntity>(serviceProvider, connectionString, databaseName);
3232
});
3333
}
3434

@@ -48,7 +48,7 @@ public static void AddTestModeMongoDbTransactions<TEntity>(this IServiceCollecti
4848
{
4949
var connectionString = getConnectionString.Invoke(serviceProvider);
5050

51-
return ActivatorUtilities.CreateInstance<TestModeMongoDbTransactionRepositoryFactory<TEntity>>(serviceProvider, connectionString, databaseName);
51+
return new TestModeMongoDbTransactionRepositoryFactory<TEntity>(serviceProvider, connectionString, databaseName);
5252
});
5353
}
5454
}

0 commit comments

Comments
 (0)