I'm trying to get a function import to work correctly. EF calls out to my stored procedure, but the result has an inner exception that I don't understand:
var result = context.SomeFunctionImport();
I get:
The 'Cnt' property on 'SomeClass' could not be set to a 'Double' value. You must set this property to a non-null value of type 'Decimal'.
Here's the Cnt
property on SomeClass
:
[DataMember]
public Nullable<decimal> Cnt
{
get { return _cnt; }
set
{
if (_cnt != value)
{
OnComplexPropertyChanging();
_cnt = value;
OnPropertyChanged("Cnt");
}
}
}
private Nullable<decimal> _cnt;