efcore icon indicating copy to clipboard operation
efcore copied to clipboard

Add proper handling when a property’s backing field cannot be inferred or the unsafe accessor cannot be generated.

Open kawasaniac opened this issue 3 months ago • 1 comments

My take on adding additional handling for the following issue: #35219

Throws InvalidOperationException with proper message as in DesignStrings (CompiledModelBackingFieldNotFound and CompiledModelUnsafeAccessorNull). Plus added additional exceptions specifically for this case.

  • [x] I've read the guidelines for contributing and seen the walkthrough
  • [x] I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
  • [x] The code builds and tests pass locally (also verified by our automated build checks)
  • [x] Commit messages follow this format:
        Summary of the changes
        - Detail 1
        - Detail 2

        Fixes #bugnumber
  • [x] Tests for the changes have been added (for bug fixes / features)
  • [x] Code follows the same patterns and style as existing code in this repo

kawasaniac avatar Sep 07 '25 18:09 kawasaniac

@dotnet-policy-service agree

kawasaniac avatar Sep 07 '25 19:09 kawasaniac