อ่านในภาษาอังกฤษ

แชร์ผ่าน


BindingSource.IsGreedy Property

Definition

Gets a value indicating whether or not a source is greedy. A greedy source will bind a model in a single operation, and will not decompose the model into sub-properties.

C#
public bool IsGreedy { get; }

Property Value

Remarks

For sources based on a IValueProvider, setting IsGreedy to false will most closely describe the behavior. This value is used inside the default model binders to determine whether or not to attempt to bind properties of a model.

Set IsGreedy to true for most custom IModelBinder implementations.

If a source represents an IModelBinder which will recursively traverse a model's properties and bind them individually using IValueProvider, then set IsGreedy to true.

Applies to

ผลิตภัณฑ์ เวอร์ชัน
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0