Repository navigation
.Net: Harden structured data mutation boundaries - #14718
Merged
Merged
Conversation
Roger Barreto (rogerbarreto)
deployed
to
github-app-auth
November 3, 2026 23:27 — with
GitHub Actions
Active
Roger Barreto (rogerbarreto)
deployed
to
integration
November 3, 2026 23:27 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Update and delete operations resolve products by non-unique names, so valid duplicate-name products cause exceptions and cannot be targeted individually without using their unique IDs.
1 open issue
What changed in this PR
This PR hardens .NET structured-data mutations by separating model-provided requests from Entity Framework entities and requiring application-controlled mapping and target resolution.
Changes:
- Makes the convenience factory query-only and disables legacy direct-entity mutation overloads.
- Adds explicit request-based mutation APIs and updates the sample to compose them.
- Adds regression coverage for mapping, scoped resolution, tracked entities, and fail-closed behavior.
| File | Description |
|---|---|
dotnet/src/Plugins/Plugins.UnitTests/StructuredData/StructuredDataServiceTests.cs |
Adds mutation-boundary regression tests and supporting fixtures. |
dotnet/src/Plugins/Plugins.StructuredData.EntityFramework/StructuredDataServiceExtensions.cs |
Adds request-based mutation overloads and disables legacy overloads. |
dotnet/src/Plugins/Plugins.StructuredData.EntityFramework/StructuredDataPluginFactory.cs |
Restricts convenience composition to queries and rejects mutations. |
dotnet/src/Plugins/Plugins.StructuredData.EntityFramework/StructuredDataOperation.cs |
Changes default operations to selection only. |
dotnet/samples/Demos/StructuredDataPlugin/Program.cs |
Explicitly composes query and application-configured mutation functions. |
dotnet/samples/Demos/StructuredDataPlugin/Product.cs |
Adds separate create, update, and delete request types. |
Review effort: Balanced
Roger Barreto (rogerbarreto)
deployed
to
github-app-auth
November 3, 2026 23:35 — with
GitHub Actions
Active
Roger Barreto (rogerbarreto)
deployed
to
integration
November 3, 2026 23:37 — with
GitHub Actions
Active
westey (westey-m)
approved these changes
Nov 4, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation and Context
Structured data mutation functions need a clear boundary between model-provided request data and Entity Framework persistence entities. Applications also need to control how update and delete targets are resolved before a mutation runs.
Description
Validation:
dotnet build dotnet\src\Plugins\Plugins.StructuredData.EntityFramework\Plugins.StructuredData.EntityFramework.csproj -c Debug --tl:off --warnaserror --no-restore— passed fornet10.0,net8.0, andnet462with 0 warnings and 0 errors.dotnet build dotnet\src\Plugins\Plugins.UnitTests\Plugins.UnitTests.csproj -c Debug -f net10.0 --tl:off --warnaserror --no-restore— passed with 0 warnings and 0 errors.dotnet test dotnet\src\Plugins\Plugins.UnitTests\Plugins.UnitTests.csproj -c Debug -f net10.0 --no-build --no-restore -v Normal --logger trx— 592 passed, 15 skipped, 0 failed.dotnet build dotnet\samples\Demos\StructuredDataPlugin\StructuredDataPlugin.csproj -c Debug --tl:off --warnaserror --no-restore— passed with 0 warnings and 0 errors.dotnet format --verify-no-changes— passed natively and withmcr.microsoft.com/dotnet/sdk:10.0for all affected projects.Contribution Checklist