This repository was archived by the owner on Apr 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/NET6CustomLibrary/Extensions Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -141,10 +141,10 @@ public static IServiceCollection AddDbContextUseMySql<TDbContext>(this IServiceC
141
141
#endregion
142
142
143
143
#region "DATABASE HEALTH CHECKS"
144
- public static IServiceCollection AddMySqlHealthChecks ( this IServiceCollection services , string connectionString )
144
+ public static IServiceCollection AddMySqlHealthChecks ( this IServiceCollection services , string connectionString , string nameAsyncCheck )
145
145
{
146
146
services . AddHealthChecks ( )
147
- . AddAsyncCheck ( "MySQL" , async ( ) =>
147
+ . AddAsyncCheck ( nameAsyncCheck , async ( ) =>
148
148
{
149
149
try
150
150
{
@@ -162,9 +162,9 @@ public static IServiceCollection AddMySqlHealthChecks(this IServiceCollection se
162
162
return services ;
163
163
}
164
164
165
- public static IEndpointRouteBuilder AddDatabaseHealthChecks ( this IEndpointRouteBuilder builder )
165
+ public static IEndpointRouteBuilder AddDatabaseHealthChecks ( this IEndpointRouteBuilder builder , string pattern )
166
166
{
167
- builder . MapHealthChecks ( "/health" , new HealthCheckOptions
167
+ builder . MapHealthChecks ( pattern , new HealthCheckOptions
168
168
{
169
169
ResponseWriter = async ( context , report ) =>
170
170
{
You can’t perform that action at this time.
0 commit comments