dotnet / dotnet/aspnetcore

In .NET 8, a request Record with a property decorated with [FromBody] is no longer model-binded

Open
#58,319 4 comments 0 reactions 0 assignees View on GitHub
area-mvc Needs: Attention :wave:
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

Under .NET 6, we had a controller Patch request method taking a Record as the parameter. The Record had a bool property decorated with the [FromBody] attribute. This was correctly model-binded. But under .NET 8, it is not model-binded -- appearing instead as missing.

### Expected Behavior

_No response_

### Steps To Reproduce

_No response_

### Exceptions (if any)

_No response_

### .NET Version

8.0

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.