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


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


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.


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