Validate an Assembly
Assembly validation scans discovered SQL statements and validates them against the active QueryLens runtime in one pass.
Steps
- Configure
QueryLens.Dialectand optionally load a schema snapshot. - Call
QueryLens.ValidateAssembly(assembly)with the target assembly. - Assert
AllValidor inspectSummary,TotalErrors, andTotalWarnings. - 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);