Currently we are upgrading SDK references to Web Api (version 8.2) On-Premise. In SDK we can directly check the datatype of the attribute like below c# code. How do i check it in Web Api ?. Do we have any property to identify the type of an attribute ?
if (entity[attributeName] is Money)
{
if ((entity[attributeName] as Money).Value == targetValue)
{
isEqual = true;
}
}
else if (entity[attributeName] is DateTime)
{
if (Convert.ToDateTime(entity[attributeName]).Date == Convert.ToDateTime(targetValue).Date && Convert.ToDateTime(targetValue) != DateTime.MinValue)
{
isEqual = true;
}
}
Thanks,
Praveen