Skip to content

Instantly share code, notes, and snippets.

@scottsauber
Last active May 22, 2017 04:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottsauber/e73e3a0f4c5b9ce1da523644680c52e4 to your computer and use it in GitHub Desktop.
Save scottsauber/e73e3a0f4c5b9ce1da523644680c52e4 to your computer and use it in GitHub Desktop.
public void ConfigureServices(IServiceCollection services)
{
services.AddHealthChecks(checks =>
{
// Local DB Check is just the name of the Health Check. You can call it whatever you want.
checks.AddSqlCheck("SQL DB Check", "Server=(localdb)\\mssqllocaldb;Database=aspnet-WebApplication1;Trusted_Connection=True;MultipleActiveResultSets=true");
});
services.AddMvc();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment