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.

Không gian làm việc Trình chuyển đổi

Dán SQL của bạn ở bên trái và nhận một thực thể C# gọn gàng ở bên phải.

Đầu vào T-SQL

CREATE TABLE

Đầu ra Entity C#

Entity Framework
Các loại SQL được Hỗ trợ int, bigint, smallint, tinyint, bit, decimal, numeric, money, float, real, date, datetime, datetime2, time, uniqueidentifier, nvarchar, varchar, nchar, char, text, ntext và hơn thế nữa.
Phát hiện Khóa Chính Hỗ trợ khóa chính nội tuyến (inline) và định nghĩa khóa chính cấp bảng phổ biến.
Kết quả Tốt nhất Dán một câu lệnh CREATE TABLE đầy đủ bao gồm lược đồ, khả năng rỗng và độ dài.

SQL to EF Model Generator

Trang này được xây dựng cho các nhà phát triển muốn có một quy trình làm việc sql to ef model trực tuyến với khả năng chuyển đổi nhanh, đầu ra dễ đọc và các tùy chọn thiết thực hướng đến Entity Framework.

  • 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
Câu hỏi thường gặp

Các câu hỏi thường gặp

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.