Developer Tools
Generate EF model classes from SQL
Build EF-ready model classes from SQL Server table definitions in seconds with clean C# properties and optional data annotations.
T-SQL 输入
CREATE TABLEC# 实体输出
Entity Framework
支持的 SQL 类型
int, bigint, smallint, tinyint, bit, decimal, numeric, money, float, real, date, datetime, datetime2, time, uniqueidentifier, nvarchar, varchar, nchar, char, text, ntext 等等。
主键检测
支持内联 (Inline) 主键和常见的表级主键定义。
最佳结果
粘贴完整的 CREATE TABLE 语句,包括 Schema、可空性和长度。
SQL to EF Model Generator
此页面专为希望获得具有快速转换、可读输出和实用的面向 Entity Framework 选项的在线 sql to ef model 工作流的开发者而构建。
- Generate Entity Framework model classes from SQL scripts
- Convert SQL Server columns into C# properties
- Support primary key detection and common EF annotations
- Create clean model classes for .NET and EF workflows
常见问题
常见问题解答
Can I generate an EF model from SQL?
Yes. Paste a SQL Server CREATE TABLE script and the tool generates an Entity Framework-style C# model class.
Does the generator detect primary keys?
The tool supports inline primary keys and common table-level primary key definitions.
Can I download the generated model?
Yes. You can copy the generated C# output or download it as a .cs file.