mirror of
https://github.com/github/awesome-copilot.git
synced 2026-05-27 17:11:44 +00:00
927 B
927 B
EF Core Model Extraction
Files to inspect
Inspect, in this order:
DbContextclasses.DbSet<T>declarations.OnModelCreating.IEntityTypeConfiguration<T>classes.- Entity classes.
- Migrations and model snapshot.
- Data annotations.
Mapping priority
When sources conflict, use:
- Latest migration / model snapshot.
- Fluent API.
- Data annotations.
- EF Core conventions.
- C# shape.
Important EF Core APIs
Look for:
ToTableHasKeyHasAlternateKeyHasIndexIsUniquePropertyHasColumnNameHasColumnTypeIsRequiredHasMaxLengthHasConversionHasOneWithManyWithOneHasForeignKeyOnDeleteOwnsOneOwnsManyUsingEntityIgnore
Migrations
Use migrations to detect:
- Actual table names.
- Join tables.
- Shadow FK columns.
- Indexes.
- Composite keys.
- Delete behaviors.
- Migration-only tables.