* Use the declared type to infer NullableContextOptions Prior to this change MVC used the runtime type rather than the declared type to determine the nullability of a property based on state. In the case of inheritance, this can be erroneous since the declared type may have a different nullability context than the model type. This change addresses this by adding content to `ModelIdentity` that allows inspecting the declared type. * Add an overload to `ModelMetadataIdentity` that allows flowing `PropertyInfo` * Use the declared type in `DataAnnotationsMetadataProvider` to determine nullability based on context. Fixes https://github.com/aspnet/AspNetCore/issues/14812 |
||
|---|---|---|
| .. | ||
| ref | ||
| src | ||
| test | ||