FieldDataTypeAttribute Class

Defines an attribute that will request use of a specific data type on a modeled table field. Typically only needed to enforce use of a specific DbType for parameters.

Definition

Namespace: Gemstone.Data.Model
Assembly: Gemstone.Data (in Gemstone.Data.dll) Version: 1.0.128 -- Release Build+cb657b646daac3e9cc5384ff42ed4530df50eab1
[AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = true)]
public sealed class FieldDataTypeAttribute : Attribute
Inheritance
Object    Attribute    FieldDataTypeAttribute

Remarks

Applying this attribute to a modeled table field with no database type parameter will specify that the field data type be used for all database types. Using a specific database type as a parameter to the attribute, e.g., [FieldDataType(DbType.DateTime2, DatabaseType.SQLServer)], means the field data type will only be applied to the specific database - however, the attribute allows multiple instances on the same identifier so you could specify different field data types for different database types. When multiple instances of the attribute are applied to the same identifier, the first attribute encountered that does not target a specific database will be considered the default value for all non-specified database types.

Constructors

FieldDataTypeAttribute(DbType) Creates a new FieldDataTypeAttribute that will request use of specific DbType.
FieldDataTypeAttribute(DbType, DatabaseType) Creates a new FieldDataTypeAttribute that will request use of specific DbType for the specified DatabaseType.

Properties

FieldDataType Gets field data type that determines which DbType should be used when using database command operations.
TargetDatabaseType Gets target DatabaseType for this FieldDataTypeAttribute.
TypeIdWhen implemented in a derived class, gets a unique identifier for this Attribute.
(Inherited from Attribute)

Methods

EqualsReturns a value that indicates whether this instance is equal to a specified object.
(Inherited from Attribute)
GetHashCodeReturns the hash code for this instance.
(Inherited from Attribute)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsDefaultAttributeWhen overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
(Inherited from Attribute)
MatchWhen overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
(Inherited from Attribute)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also