Developer Tools

Convert SQL Server tables to Entity Framework models

Transform SQL Server CREATE TABLE scripts into EF-ready C# entity classes with clean property names, type mapping and annotation support.

转换器工作区

在左侧粘贴您的 SQL,在右侧获取干净的 C# 实体代码。

T-SQL 输入

CREATE TABLE

C# 实体输出

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 Server to Entity Framework Model

此页面专为希望获得具有快速转换、可读输出和实用的面向 Entity Framework 选项的在线 sql server to entity framework 工作流的开发者而构建。

  • Generate EF-style model classes from SQL Server table definitions
  • Convert SQL Server column types to matching C# property types
  • Support nullable SQL columns and optional required attributes
  • Speed up database-first Entity Framework model creation
常见问题

常见问题解答

Can I generate Entity Framework models from SQL Server tables?

Yes. Paste your SQL Server CREATE TABLE script and generate a C# entity model suitable for Entity Framework workflows.

Does the output work with EF Core?

The generated class is designed for Entity Framework-style workflows and can be adapted for EF Core projects depending on your mapping preferences.

Can I include table and column attributes?

Yes. Attribute options can be enabled to generate annotations like [Table], [Column], [Key] and [MaxLength].