Skip to content

Commit 099dc71

Browse files
refactor: initialize with null!
refactor: remove nullable operator from setupOptions
1 parent c72b055 commit 099dc71

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Modules/Quotas/src/Quotas.Infrastructure/Persistence/Database/IServiceCollectionExtensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static class IServiceCollectionExtensions
1818
public static void AddDatabase(this IServiceCollection services, Action<DbOptions> setupOptions)
1919
{
2020
var options = new DbOptions();
21-
setupOptions?.Invoke(options);
21+
setupOptions.Invoke(options);
2222

2323
services.AddDatabase(options);
2424
}
@@ -65,8 +65,8 @@ public static void AddDatabase(this IServiceCollection services, DbOptions optio
6565

6666
public class DbOptions
6767
{
68-
public string? Provider { get; set; }
69-
public string? DbConnectionString { get; set; }
68+
public string Provider { get; set; } = null!;
69+
public string DbConnectionString { get; set; } = null!;
7070
public RetryOptions RetryOptions { get; set; } = new();
7171
}
7272

0 commit comments

Comments
 (0)