I have this code which can be used to check the database health using C# in NET 6.
Version 1:
var hcBuilder = builder.Services.AddHealthChecks();
hcBuilder.AddSqlServer(myServicesConnStr);
Version 2:
builder.Services.AddHealthChecks()
.AddDbContextCheck<MyServicesContext>();
What is the difference between version 1 and version 2 in regards to checking the health of the database using HealthCheck package? Is there any difference in its efficiency?