.NET Data Community Standup: Teach your AI agent database design with T-SQL static code analysis

Erik Ejlskov Jensen walks through two practical ways to use an open-source set of T-SQL static analysis rules (140+ rules) and its surrounding tools to improve SQL quality and database design.

Overview

1) Live T-SQL analysis while you write SQL

Erik demonstrates how to get immediate static analysis feedback on SQL scripts as you type, using the rule set in common SQL/dev environments:

The goal is to surface database design and T-SQL issues early (during authoring), rather than only during review or after deployment.

2) Guiding AI-assisted database and EF Core model design with rules

Erik also shows how the same rule set can be used alongside EF Core Power Tools to:

This approach uses rule enforcement as a guardrail so AI-assisted design stays consistent with established T-SQL and database design conventions.