Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 9e0d541

Browse files
committed
Refactoring
1 parent 23cbe8c commit 9e0d541

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/CustomLibrary.EFCore/Extensions/DependencyInjection.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ private static string GeneratePathMigrations<TDbContext>(string migrationsAssemb
182182
#endregion
183183

184184
#region "Health Checks with UI"
185-
public static IServiceCollection AddHealthChecksUISQLite<TDbContext>(this IServiceCollection services, string webAddressTitle, string dbConnectionString) where TDbContext : DbContext
185+
public static IServiceCollection AddHealthChecksUISQLite<TDbContext>(this IServiceCollection services, string dbConnectionString)
186+
where TDbContext : DbContext
186187
{
187188
services.AddHealthChecks()
188189
.AddDbContextCheck<TDbContext>(name: "Application DB Context", failureStatus: HealthStatus.Degraded)
189-
.AddUrlGroup(new Uri("https://angelodotnet.github.io/"), name: webAddressTitle, failureStatus: HealthStatus.Degraded)
190190
.AddSqlite(dbConnectionString);
191191

192192
services.AddHealthChecksUI(setupSettings: setup =>
@@ -197,11 +197,11 @@ public static IServiceCollection AddHealthChecksUISQLite<TDbContext>(this IServi
197197
return services;
198198
}
199199

200-
public static IServiceCollection AddHealthChecksUISQLServer<TDbContext>(this IServiceCollection services, string webAddressTitle, string dbConnectionString, int pollingInterval = 5) where TDbContext : DbContext
200+
public static IServiceCollection AddHealthChecksUISQLServer<TDbContext>(this IServiceCollection services, string dbConnectionString,
201+
int pollingInterval = 5) where TDbContext : DbContext
201202
{
202203
services.AddHealthChecks()
203204
.AddDbContextCheck<TDbContext>(name: "Application DB Context", failureStatus: HealthStatus.Degraded)
204-
.AddUrlGroup(new Uri("https://angelodotnet.github.io/"), name: webAddressTitle, failureStatus: HealthStatus.Degraded)
205205
.AddSqlServer(dbConnectionString);
206206

207207
services.AddHealthChecksUI(setupSettings: setup =>
@@ -213,11 +213,11 @@ public static IServiceCollection AddHealthChecksUISQLServer<TDbContext>(this ISe
213213
return services;
214214
}
215215

216-
public static IServiceCollection AddHealthChecksUIMySQL<TDbContext>(this IServiceCollection services, string webAddressTitle, string dbConnectionString, int pollingInterval = 5) where TDbContext : DbContext
216+
public static IServiceCollection AddHealthChecksUIMySQL<TDbContext>(this IServiceCollection services, string dbConnectionString,
217+
int pollingInterval = 5) where TDbContext : DbContext
217218
{
218219
services.AddHealthChecks()
219220
.AddDbContextCheck<TDbContext>(name: "Application DB Context", failureStatus: HealthStatus.Degraded)
220-
.AddUrlGroup(new Uri("https://angelodotnet.github.io/"), name: webAddressTitle, failureStatus: HealthStatus.Degraded)
221221
.AddMySql(dbConnectionString);
222222

223223
services.AddHealthChecksUI(setupSettings: setup =>
@@ -229,11 +229,11 @@ public static IServiceCollection AddHealthChecksUIMySQL<TDbContext>(this IServic
229229
return services;
230230
}
231231

232-
public static IServiceCollection AddHealthChecksUIPostgreSQL<TDbContext>(this IServiceCollection services, string webAddressTitle, string dbConnectionString, int pollingInterval = 5) where TDbContext : DbContext
232+
public static IServiceCollection AddHealthChecksUIPostgreSQL<TDbContext>(this IServiceCollection services, string dbConnectionString,
233+
int pollingInterval = 5) where TDbContext : DbContext
233234
{
234235
services.AddHealthChecks()
235236
.AddDbContextCheck<TDbContext>(name: "Application DB Context", failureStatus: HealthStatus.Degraded)
236-
.AddUrlGroup(new Uri("https://angelodotnet.github.io/"), name: webAddressTitle, failureStatus: HealthStatus.Degraded)
237237
.AddNpgSql(dbConnectionString);
238238

239239
services.AddHealthChecksUI(setupSettings: setup =>

0 commit comments

Comments
 (0)