Dela via


ApiBehaviorOptions.SuppressInferBindingSourcesForParameters Property

Definition

Gets or sets a value that determines if model binding sources are inferred for action parameters on controllers annotated with ApiControllerAttribute is suppressed.

When enabled, the following sources are inferred: Parameters that appear as route values, are assumed to be bound from the path (Path). Parameters of type IFormFile and IFormFileCollection are assumed to be bound from form. Parameters that are complex (IsComplexType) and are registered in the DI Container (IServiceCollection) are assumed to be bound from the services Services, unless this option is explicitly disabled DisableImplicitFromServicesParameters. Parameters that are complex (IsComplexType) are assumed to be bound from the body (Body). All other parameters are assumed to be bound from the query.

public:
 property bool SuppressInferBindingSourcesForParameters { bool get(); void set(bool value); };
public bool SuppressInferBindingSourcesForParameters { get; set; }
member this.SuppressInferBindingSourcesForParameters : bool with get, set
Public Property SuppressInferBindingSourcesForParameters As Boolean

Property Value

Applies to