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
141141 #endregion
142142
143143 #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 )
145145 {
146146 services . AddHealthChecks ( )
147- . AddAsyncCheck ( "MySQL" , async ( ) =>
147+ . AddAsyncCheck ( nameAsyncCheck , async ( ) =>
148148 {
149149 try
150150 {
@@ -162,9 +162,9 @@ public static IServiceCollection AddMySqlHealthChecks(this IServiceCollection se
162162 return services ;
163163 }
164164
165- public static IEndpointRouteBuilder AddDatabaseHealthChecks ( this IEndpointRouteBuilder builder )
165+ public static IEndpointRouteBuilder AddDatabaseHealthChecks ( this IEndpointRouteBuilder builder , string pattern )
166166 {
167- builder . MapHealthChecks ( "/health" , new HealthCheckOptions
167+ builder . MapHealthChecks ( pattern , new HealthCheckOptions
168168 {
169169 ResponseWriter = async ( context , report ) =>
170170 {
You can’t perform that action at this time.
0 commit comments