❔ What's the difference between `[Bind]` and `[BindNever]` when applied to a class?
I have read https://learn.microsoft.com/en-us/aspnet/core/mvc/models/model-binding?view=aspnetcore-7.0#attributes-for-complex-type-targets, and their difference seems to be that
Bind
can be applied at just the class and specify what properties to bind, while BindNever
is just like the inverse of Bind
except that it needs to be applied to the properties that you don't want to bind. It seems like they differ only in the places where they should be applied. Is this correct?Model Binding in ASP.NET Core
Learn how model binding in ASP.NET Core works and how to customize its behavior.
1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.