.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:
- VS Code
- Visual Studio
- SQL Server Management Studio (SSMS)
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:
- Build a database model with AI assistance
- Generate or align an EF Core model from that database design
- Enforce the static analysis rules to constrain and guide the AI output toward the team’s database standards
This approach uses rule enforcement as a guardrail so AI-assisted design stays consistent with established T-SQL and database design conventions.
Featured guests
- Jiri Cincura
- Erik Ejlskov Jensen