title: ef4 poco double/float dbtype mapping
body: <p>I have an exiting database with couple of float/double fields, I chose to use <strong>EF4.1</strong> for my DAL/ORM, but I am having problems when reading/saving data to his type of fields. There is no model, just using model builder to configure the entities.</p>
  
  <p>First there was a rounding problem, I think typical of floating point math, so because all of the precision were already set as 2 decimals, I switched to using decimal type on the c# (EF) side, but now when I am trying to get an entity, I get an exception saying I am in trouble.</p>
  
  <blockquote>
    <p>The 'xxxkg' property on 'YYY' could not be set to a 'Double' value.
    You must set this property to a non-null value of type 'Decimal'.</p>
  </blockquote>
  
  <p><code>xxxkg</code> is <code>float null</code> on the database, and the value is <code>10</code> in the specific case, and in the class it is </p>
  
  <pre><code>public decimal? xxxkg { get; set; }
  </code></pre>
  
  <p>The question is how to deal with dbtype float/double variables with EF4 (poco)?</p>