Skip to content

Conversation

@rstam
Copy link
Contributor

@rstam rstam commented Nov 22, 2025

This is a prototype of how we might be able to support using a public read-only property of a POCO as the discriminator.

The key is to configure which property (if any) of the POCO to use as the discriminator. That's what the new [BsonDiscriminatorMember] attribute and SetDiscriminatorMember method are about.

The rest of the changes are some relatively small changes to account for the fact that the differences between a hidden _t field and a public POCO member.

@rstam rstam requested review from BorisDog and papafe November 22, 2025 00:45
@rstam rstam requested a review from a team as a code owner November 22, 2025 00:45
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.

1 participant