Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Microsoft.AspNet.OData version 7.5.12 and higher throwing ModelBinding.ModelError -- Value cannot be null.\r\nParameter name: nullableType #2735

Open
jons-bakerhill opened this issue Dec 5, 2022 · 0 comments
Assignees

Comments

@jons-bakerhill
Copy link

@corranrogue9

Same issue as #2645 but I can't reopen that one.

Assemblies affected

Microsoft.AspNet.OData version 7.5.12 and higher

Reproduce steps

Attempt to submit to a method with the signature

[AcceptVerbs("PATCH")]
public virtual async Task<IHttpActionResult> Patch([FromODataUri] Guid key, Delta<T> partialT)

where <T> is an EF model with some properties with the attribute NotMapped, that inherits from another class (which implements 2 more interfaces), and which implements an interface with a type parameter of the model

    public class ProblemClass: EntityFrameworkModel, Auditing.ISystemAuditable<ProblemClass>

    public abstract class EntityFrameworkModel : ICommonModel, IId

Expected result

Database successfully updated.

Actual result

Value cannot be null.\r\nParameter name: nullableType

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants