Skip to content
Documentation

FromPrefixedQueryAttribute Class

Specifies that a parameter or property should be bound from query string parameters using the specified prefix.

public sealed class FromPrefixedQueryAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider, Microsoft.AspNetCore.Http.Metadata.IFromQueryMetadata

Inheritance System.Object 🡒 System.Attribute 🡒 FromPrefixedQueryAttribute

Implements Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider, Microsoft.AspNetCore.Http.Metadata.IFromQueryMetadata

FromPrefixedQueryAttribute(string) Constructor

Section titled “FromPrefixedQueryAttribute(string) Constructor”

Initializes a new instance of the FromPrefixedQueryAttribute class with the specified query parameter prefix.

public FromPrefixedQueryAttribute(string prefix);

prefix System.String

The prefix to prepend to query parameter names during binding.

FromPrefixedQueryAttribute.BindingSource Property

Section titled “FromPrefixedQueryAttribute.BindingSource Property”

Gets the Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource for this attribute, which is a PrefixedQueryBindingSource using the configured Prefix.

public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource? BindingSource { get; }

Implements BindingSource

Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource

FromPrefixedQueryAttribute.Description Property

Section titled “FromPrefixedQueryAttribute.Description Property”

Gets or sets an optional description for the prefixed query parameters.

public string? Description { get; set; }

System.String

Gets or sets the model name used for binding. If null, the parameter name is used.

public string? Name { get; set; }

Implements Name, Name

System.String

FromPrefixedQueryAttribute.Prefix Property

Section titled “FromPrefixedQueryAttribute.Prefix Property”

Gets the prefix prepended to query parameter names during binding.

public string Prefix { get; }

System.String

© 2026 Volue.Version v0.6.38017 November 2026