dotConnect for Dynamics 365 Documentation
In This Topic
    Entity Framework Data Type Mapping
    In This Topic

    Dynamics 365 to .NET type mapping

    Type mapping rules from this table are used when generating a model from a data source with Entity Data Model Wizard in Visual Studio 2010 - 2023 and Create Model Wizard in Entity Developer.

    Provider Data Type

    SSDL1

    CSDL1

    .NET

    BOOLEAN boolean Boolean System.Boolean
    SHORT short Int16 System.Int16
    INT int Int32 System.Int32
    LONG long Int64 System.Int64
    BYTE byte Byte System.Byte
    SBYTE sbyte SByte System.SByte
    SINGLE single Single System.Single
    DOUBLE double precision Double System.Double
    DECIMAL decimal Decimal System.Decimal
    CURRENCY decimal Decimal System.Decimal
    DATE date DateTime System.DateTime
    TIME time Time System.DateTime
    DATETIME datetime DateTime System.DateTime
    DATETIME2 datetime DateTime System.DateTime
    DATETIMEOFFSET datetimeoffset DateTimeOffset System.DateTimeOffset
    STRING string String System.String
    GUID guid Guid System.Guid
    BINARY binary Binary System.Byte[]

    1 Applicable only to Entity Framework v1 - v6. Not applicable to Entity Framework Core, because Entity Framework Core does not support XML mapping.