Skip to main content
.NET Framework 4.5.2+

DbTypeAttribute Class

Specifies the database type of the column that a property is mapped to.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v24.1.dll

NuGet Package: DevExpress.Xpo

Declaration

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true)]
public sealed class DbTypeAttribute :
    Attribute

Remarks

The DbTypeAttribute can be used to designate a provider-specific database type for the column which the persistent property or field is mapped to:

public class MyPersistentObject : XPObject {
    // ...
    DateTime myReadDate;
    [DbType("smalldatetime")]
    public DateTime ReadDate {
        get { return myReadDate; }
        set {
                myReadDate = value;
        }
    }
}

Inheritance

Object
Attribute
DbTypeAttribute
See Also