System.Data.Common.DbProviderSpecificTypePropertyAttribute Class

Identifies which provider-specific property in the strongly typed parameter classes is to be used when setting a provider-specific type.

See Also: DbProviderSpecificTypePropertyAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed class DbProviderSpecificTypePropertyAttribute : Attribute

Remarks

The System.Data.Common.DbProviderSpecificTypePropertyAttribute is used by a provider writer to designate a provider-specific type parameter property which is not inherited from the System.Data.Common.DbParameter base class. The System.Data.SqlClient.SqlParameter.SqlDbType property of a System.Data.SqlClient.SqlParameter is an example of a provider-specific type property not found in DbParameter.

A provider writer can apply DbProviderSpecificTypePropertyAttribute(true) to indicate a provider-specific data type parameter property. This allows for its discovery using reflection, which enables code generation tools, such as those used in Visual Studio, to generate code geared to a specific provider. The DbProviderSpecificTypePropertyAttribute.IsProviderSpecificTypeProperty property returns true if the property has been set, otherwise false.

Requirements

Namespace: System.Data.Common
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0