In the EF.Reverse.POCO.Core.ttinclude::GetPropertyType, the "numeric" case assumes that the scale is greater than zero. For database types such as Numeric(17,0), the C# type should resolve to something in the "int" family.
Here is the code that I adjusted:
From:
```
case "numeric":
case "smallmoney":
case "decimal":
case "money":
sysType = "decimal";
break;
```
To:
```
case "numeric":
case "decimal":
{
if ( Scale == 0 )
{
if ( Precision >= 15 )
sysType = "Int64";
else if ( Precision >= 8 )
sysType = "Int32";
else
sysType = "Int16";
}
else
{
sysType = "Decimal";
}
}
break;
case "smallmoney":
case "money":
sysType = "decimal";
break;
```
Comments: ErikEJ - Thank you! I understand and have adjusted the code above to include decimal. Thanks again for your input.
Here is the code that I adjusted:
From:
```
case "numeric":
case "smallmoney":
case "decimal":
case "money":
sysType = "decimal";
break;
```
To:
```
case "numeric":
case "decimal":
{
if ( Scale == 0 )
{
if ( Precision >= 15 )
sysType = "Int64";
else if ( Precision >= 8 )
sysType = "Int32";
else
sysType = "Int16";
}
else
{
sysType = "Decimal";
}
}
break;
case "smallmoney":
case "money":
sysType = "decimal";
break;
```
Comments: ErikEJ - Thank you! I understand and have adjusted the code above to include decimal. Thanks again for your input.