Dynamics crm 如何获取任何crm实体属性的edm数据类型(odata类型)

Dynamics crm 如何获取任何crm实体属性的edm数据类型(odata类型),dynamics-crm,olingo,Dynamics Crm,Olingo,这个api为我提供了诸如Picklist、Money等数据类型(crm数据类型),我要寻找的是edm数据类型,如edm.Int32(Picklist)、edm.Decimal(Money),据我所知,元数据没有任何对本机.NET类型的引用 提供映射 这里还有一个截图: 以下是我在代码中映射它们的一种方法: GET [Organization URI]/api/data/v9.0//EntityDefinitions(LogicalName=account)/Attributes?$select

这个api为我提供了诸如Picklist、Money等数据类型(crm数据类型),我要寻找的是edm数据类型,如edm.Int32(Picklist)、edm.Decimal(Money)

,据我所知,元数据没有任何对本机.NET类型的引用

提供映射

这里还有一个截图:

以下是我在代码中映射它们的一种方法:

GET [Organization URI]/api/data/v9.0//EntityDefinitions(LogicalName=account)/Attributes?$select=LogicalName,AttributeType,AttributeOf
var字典=新字典
{
{AttributeTypeCode.Integer,typeof(int)},
{AttributeTypeCode.BigInt,typeof(long)},
{AttributeTypeCode.Decimal,typeof(Decimal)},
{AttributeTypeCode.Double,typeof(Double)},
{AttributeTypeCode.DateTime,typeof(DateTime)},
{AttributeTypeCode.Money,typeof(decimal)},
};
var dictionary = new Dictionary<AttributeTypeCode, Type>
{
    {AttributeTypeCode.Integer, typeof(int) },
    {AttributeTypeCode.BigInt, typeof(long) },
    {AttributeTypeCode.Decimal, typeof(decimal) },
    {AttributeTypeCode.Double, typeof(double) },
    {AttributeTypeCode.DateTime, typeof(DateTime) },
    {AttributeTypeCode.Money, typeof(decimal) },
};