End-User Documentation

Validate an Assembly

Validate an Assembly

Assembly validation scans discovered SQL statements and validates them against the active QueryLens runtime in one pass.

Steps

  1. Configure QueryLens.Dialect and optionally load a schema snapshot.
  2. Call QueryLens.ValidateAssembly(assembly) with the target assembly.
  3. Assert AllValid or inspect Summary, TotalErrors, and TotalWarnings.
  4. Use assembly validation in CI to detect query regressions across a registry-style codebase.

Example

QueryLens.Dialect = DialectProfile.SqlServer2019;

var result = QueryLens.ValidateAssembly(typeof(OrderQueries).Assembly);

Assert.True(result.AllValid, result.Summary);

Related