© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
2 replies
palapapa

❔ What is the purpose of `ModelBindingContext.Model`, `ModelName`, and `ModelBinderAttribute.Name`?

The docs are very unclear about this. If I should set
ModelBindingContext.Result
ModelBindingContext.Result
to
ModelBindingResult.Success(result)
ModelBindingResult.Success(result)
, then what is the point of setting
ModelBindingContext.Model
ModelBindingContext.Model
?
Also, what is the point of
ModelBindingContext.ModelName
ModelBindingContext.ModelName
? I don't understand what its value is supposed to be from the docs alone. From my understanding, the "model" being referred to here is my custom model class, then how am I supposed to "look up values in
IValueProvider
IValueProvider
during model binding," if the model is the thing I need to set? This also brings it to my last question, which is what exactly is
ModelBinderAttribute.Name
ModelBinderAttribute.Name
setting?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,828Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ What is the purpose of `[FromServices]`
C#CC# / help
3y ago
✅ Purpose and use of nameof() keyword
C#CC# / help
12mo ago
What's the purpose of MarshalByRefObject?
C#CC# / help
4y ago
❔ what is the name of such a system?
C#CC# / help
3y ago