Skip to content

Commit

Permalink
add TimeProvider (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikus1993 committed Jan 31, 2024
1 parent 4df6216 commit 23b5645
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public static async Task<IServiceCollection> AddInfrastructure(this IServiceColl
var client = MongoDbSetup.MongoClient(configuration.GetConnectionString("Games"));

Check warning on line 27 in src/XboxPromotionCheckerBot.App/Infrastructure/Extensions/WebApplicationBuilderExtensions.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'connection' in 'IMongoClient MongoDbSetup.MongoClient(string connection)'.
var db = client.GamesDb();
await db.Setup();


services.AddSingleton<TimeProvider>(TimeProvider.System);
services.AddSingleton<IMongoClient>(client);
services.AddSingleton<IMongoDatabase>(db);

Expand Down

0 comments on commit 23b5645

Please sign in to comment.