
CREATE TABLE statements, for example from SSMS "Script Table as", SHOW CREATE TABLE in MySQL or pg_dump --schema-only.CREATE TABLE users (id INT IDENTITY PRIMARY KEY, user_name NVARCHAR(50) NOT NULL, email VARCHAR(255) NULL) becomes a C# class with public int Id, public string UserName and public string? Email. With annotations turned on, Id gets [Key] and [DatabaseGenerated(DatabaseGeneratedOption.Identity)], and UserName gets [Required], [MaxLength(50)] and [Column("user_name")].
Nullable columns become int? in C#, Integer instead of int in Java and | null in TypeScript. DECIMAL maps to decimal / BigDecimal, UNIQUEIDENTIFIER and uuid to Guid / UUID, DATETIMEOFFSET and timestamptz to DateTimeOffset / OffsetDateTime. MySQL TINYINT(1) becomes bool, and SQL Server timestamp (rowversion) becomes byte[]. PostgreSQL arrays such as text[] become arrays or List.
Which lines are ignored? Indexes, foreign keys, CHECK constraints, table options such as ENGINE=InnoDB, and computed columns (AS (...)). The primary key is read both from the column and from CONSTRAINT ... PRIMARY KEY (...).
How is a composite primary key handled? In C# the class gets [PrimaryKey(nameof(A), nameof(B))] (EF Core 7+). In Java each key field gets @Id, and you still need an @IdClass.
Why does a non-null string end with = null!;? With nullable reference types enabled, this tells the compiler that EF Core fills the value, so you do not get warning CS8618.