Skip to content

Document complex type property configuration via lambda chaining#5349

Merged
roji merged 1 commit intodotnet:preview.5from
roji:roji/complex-type-chaining-docs
May 1, 2026
Merged

Document complex type property configuration via lambda chaining#5349
roji merged 1 commit intodotnet:preview.5from
roji:roji/complex-type-chaining-docs

Conversation

@roji
Copy link
Copy Markdown
Member

@roji roji commented Apr 30, 2026

Add a what's new section for EF Core 11 documenting dotnet/efcore#31236: configuring complex type properties directly via chained member access in the lambda expression.

Shows the previous verbose pattern:

modelBuilder.Entity<MyEntity>()
    .ComplexProperty(e => e.Details)
    .Property(d => d.Description)
    .HasMaxLength(500);

And the new shorter approach:

modelBuilder.Entity<MyEntity>()
    .Property(e => e.Details.Description)
    .HasMaxLength(500);

Including an example with nested complex types.

Copilot AI review requested due to automatic review settings April 30, 2026 10:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “What’s New” documentation section for EF Core 11 describing the ability to configure complex type properties by using chained member access directly in the Property(...) lambda, including a nested complex type example.

Changes:

  • Document the previous ComplexProperty(...).Property(...) configuration pattern.
  • Document the new shorter Property(e => e.Complex.Prop) configuration pattern.
  • Add an additional example demonstrating nested complex types.

@roji roji force-pushed the roji/complex-type-chaining-docs branch from 12c9867 to cb8dd73 Compare April 30, 2026 10:56
@roji roji force-pushed the roji/complex-type-chaining-docs branch from cb8dd73 to 2d47a2a Compare April 30, 2026 10:59
Copilot AI review requested due to automatic review settings April 30, 2026 10:59
@roji roji changed the base branch from main to preview.5 April 30, 2026 10:59
Add what's new section for dotnet/efcore#31236, showing how EF Core 11
allows configuring complex type properties directly via chained member
access (e.g. e => e.Details.Description) instead of requiring explicit
ComplexProperty().Property() calls.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roji roji force-pushed the roji/complex-type-chaining-docs branch from 2d47a2a to cbd78fd Compare April 30, 2026 11:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
Comment thread entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
@roji roji merged commit c0d05f0 into dotnet:preview.5 May 1, 2026
4 checks passed
@roji roji deleted the roji/complex-type-chaining-docs branch May 1, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants