title: How to get rid of 'property could not be set to a double value, you must set this property to a non-null value of type decimal'
body: <p>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:</p>
  
  <pre><code>var result = context.SomeFunctionImport();
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>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'.</p>
  </blockquote>
  
  <p>Here's the <code>Cnt</code> property on <code>SomeClass</code>:</p>
  
  <pre><code>    [DataMember]
      public Nullable&lt;decimal&gt; Cnt
      {
          get { return _cnt; }
          set
          {
              if (_cnt != value)
              {
                  OnComplexPropertyChanging();
                  _cnt = value;
                  OnPropertyChanged("Cnt");
              }
          }
      }
      private Nullable&lt;decimal&gt; _cnt;
  </code></pre>