using Microsoft.EntityFrameworkCore; namespace ZB.MOM.WW.Health.EntityFrameworkCore; /// /// Options for . /// /// The EF Core the probe runs against. public sealed class DatabaseHealthCheckOptions where TContext : DbContext { /// /// Optional query-based probe that overrides the default /// /// reachability check with stricter, query-level validation (the OtOpcUa "query Deployments" /// pattern). Throw to signal failure; return normally to signal success. /// /// /// Example: (db, ct) => db.Deployments.AsNoTracking().Take(1).ToListAsync(ct). /// When null, the default CanConnectAsync probe is used. /// public Func? ProbeQuery { get; set; } /// /// Maximum time the probe may run before it is treated as a failure. Defaults to 10 seconds. /// public TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds(10); }