22 lines
792 B
C#
22 lines
792 B
C#
// Copyright (c) .NET Foundation. All rights reserved.
|
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
|
|
using System;
|
|
using Microsoft.AspNet.Mvc.ModelBinding;
|
|
|
|
namespace Microsoft.AspNet.Mvc
|
|
{
|
|
/// <summary>
|
|
/// Specifies that a parameter or property should be bound using the request query string.
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
|
|
public class FromQueryAttribute : Attribute, IBindingSourceMetadata, IModelNameProvider
|
|
{
|
|
/// <inheritdoc />
|
|
public BindingSource BindingSource { get { return BindingSource.Query; } }
|
|
|
|
/// <inheritdoc />
|
|
public string Name { get; set; }
|
|
}
|
|
}
|