dotnet / dotnet/efcore

Allow specifying different key facets per table in TPT, TPC or entity splitting

Open
#27,972 0 comments 9 reactions 1 assignee Claimed by @AndriySvyryd View on GitHub
area-model-building area-relational-mapping
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

Split off from #19811
``` C#
modelBuilder.Entity().ToTable("Customer");
modelBuilder.Entity().ToTable("SpecialCustomer", tb =>
{
tb.HasKey(c => c.Id).HasName("PK_Customer");
});
```

Alternative API:
``` C#
modelBuilder.Entity().HasKey(c => c.Id)
.ToTable("CustomerDetails", tb => tb.HasName("PK_Customer"));
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.