Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>.NET Model Generator from SQLNew to Visual Studio Code? Get it now.
.NET Model Generator from SQL

.NET Model Generator from SQL

sachin kore

|
32 installs
| (0) | Free
Generates .NET 8 model classes from SQL CREATE TABLE statements (supports SQL Server, MySQL, SQLite)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

.NET Model Generator from SQL

Version License

A VS Code extension that generates .NET 8 model classes from SQL CREATE TABLE statements (supports SQL Server, MySQL, and SQLite).

Demo

Features

  • 🚀 Multi-Database Support: Works with SQL Server, MySQL, and SQLite syntax
  • 🛠 Accurate Type Mapping: Converts SQL types to proper C# types (.NET 8)
  • 🔍 Comprehensive Annotations:
    • [Table] and [Column] attributes
    • [Key] for primary keys
    • [MaxLength] for string fields
    • [Required] for non-nullable fields
  • ⚙ Configurable:
    • Default namespace
    • Nullable reference types
  • 📂 Automatic File Creation: Generates files in the correct Models folder

Installation

  1. Open VS Code
  2. Go to Extensions view (Ctrl+Shift+X)
  3. Search for ".NET Model Generator from SQL"
  4. Click Install

Usage

  1. Open your .NET project in VS Code
  2. Press Ctrl+Shift+P to open Command Palette
  3. Search for and run: Generate .NET Model from SQL
  4. Select your database type (SQL Server, MySQL, or SQLite)
  5. Paste your CREATE TABLE statement
  6. The model will be generated in your Models folder

Example Input (SQL Server):

CREATE TABLE [dbo].[Customers] (
    [CustomerID] int PRIMARY KEY,
    [Name] nvarchar(100) NOT NULL,
    [Email] nvarchar(255),
    [Age] int,
    [JoinDate] datetime2 NOT NULL,
    [IsActive] bit DEFAULT 1
)
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft