/// <summary> /// Adds a <see cref="SqlHealthCheck"/> to the services. /// </summary> /// <param name="builder">The health check builder</param> /// <param name="name">The health check name</param> /// <param name="connectionBuilder">The connection builder function</param> /// <param name="sql">The SQL to be executed agains the database. If null or empty, the connection will only be open.</param> /// <param name="required">Is the health check required?</param> /// <param name="tags">The collection of tags</param> /// <returns>The builder after changes</returns> /// <exception cref="ArgumentNullException"></exception> public static IHealthCheckBuilder AddSql(this IHealthCheckBuilder builder, string name, Func <DbConnection> connectionBuilder, string sql = null, bool required = false, params string[] tags) { return(builder.AddSql(new SqlHealthCheckProperties(name, connectionBuilder, sql, required, tags))); }