diff --git a/BankApi.Core/Defaults/Builder.Auth.cs b/BankApi.Core/Defaults/Builder.Auth.cs index bf4fe4c..0858e50 100644 --- a/BankApi.Core/Defaults/Builder.Auth.cs +++ b/BankApi.Core/Defaults/Builder.Auth.cs @@ -6,7 +6,7 @@ public static partial class ApiBuilder { public static IServiceCollection AddAuthServices(this IServiceCollection services) { - var apiKeyEvents = new ApiKeyEvents + ApiKeyEvents apiKeyEvents = new() { OnValidateKey = context => { diff --git a/BankApi.Core/Defaults/Builder.DownstreamApi.cs b/BankApi.Core/Defaults/Builder.DownstreamApi.cs index c9574ec..390d974 100644 --- a/BankApi.Core/Defaults/Builder.DownstreamApi.cs +++ b/BankApi.Core/Defaults/Builder.DownstreamApi.cs @@ -25,4 +25,4 @@ public static IServiceCollection AddDownstreamApiServices(this IServiceCollectio return services; } -} \ No newline at end of file +} diff --git a/BankApi.Core/Implementation/Operation.Teller.cs b/BankApi.Core/Implementation/Operation.Teller.cs index a672d49..883e211 100644 --- a/BankApi.Core/Implementation/Operation.Teller.cs +++ b/BankApi.Core/Implementation/Operation.Teller.cs @@ -17,7 +17,7 @@ public static async Task, NotFound, UnprocessableEntity>> Get var release = await client.Repos["dotnet"]["runtime"].Releases.Latest.GetAsync(cancellationToken: cancellationToken); return release?.Author?.HtmlUrl is string authorGitHubUrl - ? TypedResults.Ok(new Teller() { GitHubProfile = new Uri(authorGitHubUrl) }) + ? TypedResults.Ok(new Teller() { GitHubProfile = new (authorGitHubUrl) }) : TypedResults.NotFound(); } diff --git a/BankApi.Service.Beta/Program.cs b/BankApi.Service.Beta/Program.cs index 74a8414..0fd10a4 100644 --- a/BankApi.Service.Beta/Program.cs +++ b/BankApi.Service.Beta/Program.cs @@ -25,7 +25,7 @@ var app = builder.Build(); app.UseExceptionHandler(); -app.UsePathBase(new PathString($"/{GlobalConfiguration.ApiDocument.Info.Version}")); // Useful when versioning routing happens in an API Management system +app.UsePathBase(new ($"/{GlobalConfiguration.ApiDocument.Info.Version}")); // Useful when versioning routing happens in an API Management system app.UseAuthorization(); // explicitly register because we use path base app.UseRateLimiter(); app.UseCors(); diff --git a/BankApi.Service.Stable/Program.cs b/BankApi.Service.Stable/Program.cs index 74a8414..0fd10a4 100644 --- a/BankApi.Service.Stable/Program.cs +++ b/BankApi.Service.Stable/Program.cs @@ -25,7 +25,7 @@ var app = builder.Build(); app.UseExceptionHandler(); -app.UsePathBase(new PathString($"/{GlobalConfiguration.ApiDocument.Info.Version}")); // Useful when versioning routing happens in an API Management system +app.UsePathBase(new ($"/{GlobalConfiguration.ApiDocument.Info.Version}")); // Useful when versioning routing happens in an API Management system app.UseAuthorization(); // explicitly register because we use path base app.UseRateLimiter(); app.UseCors(); diff --git a/BankApi.Tests/MockDb.Bank.cs b/BankApi.Tests/MockDb.Bank.cs index 9e4e6a6..1bf9358 100644 --- a/BankApi.Tests/MockDb.Bank.cs +++ b/BankApi.Tests/MockDb.Bank.cs @@ -8,6 +8,6 @@ public BankDb CreateDbContext() .UseInMemoryDatabase(GlobalConfiguration.ApiSettings!.DatabaseName) .Options; - return new BankDb(options); + return new (options); } } \ No newline at end of file diff --git a/BankApi.Tests/Program.cs b/BankApi.Tests/Program.cs index f997a6d..81a3dcc 100644 --- a/BankApi.Tests/Program.cs +++ b/BankApi.Tests/Program.cs @@ -19,7 +19,7 @@ public static Task CreateContext() [Test] public async Task CreateBankReturnsCreated() { - var response = await BankOperation.CreateBank(new BankModel() + var response = await BankOperation.CreateBank(new () { BankTier = BankTier.A, Id = Guid.Parse(bankId), @@ -32,7 +32,7 @@ public async Task CreateBankReturnsCreated() [Test, DependsOn(nameof(CreateBankReturnsCreated))] public async Task UpdateBankReturnsNoContent() { - var response = await BankOperation.UpdateBank(Guid.Parse(bankId), new BankModel() + var response = await BankOperation.UpdateBank(Guid.Parse(bankId), new () { BankTier = BankTier.A, Id = Guid.Parse(bankId),