Skip to content

Conversation

ajcvickers
Copy link
Collaborator

That is, the IProperty or INavigation associated with the access. Types, requiredness, type-mappings, etc. are then obtained from the property.

An alias is passed in if the name in the BSON document is different from the mapped element name for the property.

That is, the IProperty or INavigation associated with the access. Types, requiredness, type-mappings, etc. are then obtained from the property.

An alias is passed in if the name in the BSON document is different from the mapped element name for the property.
@ajcvickers ajcvickers requested a review from damieng October 1, 2025 15:14
@ajcvickers ajcvickers requested a review from a team as a code owner October 1, 2025 15:14
@ajcvickers ajcvickers requested review from Copilot and removed request for a team October 1, 2025 15:14
Copy link
Contributor

@Copilot 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

This PR refactors the CreateGetValueExpression method to flow Entity Framework metadata (properties and navigations) down through the expression tree instead of relying solely on string names and separate type information. The changes consolidate metadata handling by passing IProperty or INavigation objects directly, allowing type mappings, requiredness, and other attributes to be derived from the metadata rather than passed separately.

Key changes include:

  • Simplified CreateGetValueExpression method signature to accept IPropertyBase instead of multiple separate parameters
  • Updated method calls throughout the codebase to pass null as the new alias parameter
  • Enhanced error messages and metadata access patterns

Reviewed Changes

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

Show a summary per file
File Description
BsonBinding.cs Core refactoring of CreateGetValueExpression method to use EF metadata objects
MongoProjectionBindingRemovingExpressionVisitor.cs Updated to work with new metadata-driven approach and simplified constructor
BsonSerializerFactory.cs Added alias parameter to GetPropertySerializationInfo method
EntitySerializer.cs Updated call to pass null alias to GetPropertySerializationInfo
MongoUpdate.cs Updated call to pass null alias to GetPropertySerializationInfo
MongoShapedQueryCompilingExpressionVisitor.cs Removed rootEntityType parameter from visitor constructor
BsonBindingTests.cs Updated test method calls to include new null alias parameter
NorthwindMiscellaneousQueryMongoTest.cs Updated test expectations and error message assertions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ajcvickers ajcvickers requested a review from Copilot October 2, 2025 07:29
Copy link
Contributor

@Copilot 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 8 out of 8 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

2 participants