title: Entity Framework with Oracle - Edmmapping
body: <p>I'm working with the Entity Framework 6 on an Oracle legacy database.
  The EF maps for example Number(1) automatically to bool or Number(2) to byte, but I need to have them all as Int32.</p>
  
  <p>I have added the edmMappings block to the app.config like described by Oracle: <a href="https://docs.oracle.com/cd/E56485_01/win.121/e55744/entityDataTypeMapping.htm#BABGBJCI" rel="nofollow">https://docs.oracle.com/cd/E56485_01/win.121/e55744/entityDataTypeMapping.htm#BABGBJCI</a>
  But it doesn't work, it always generates bool and int16 instead of int32</p>
  
  <p>My Mapping in the app.config:</p>
  
  <pre><code>&lt;oracle.manageddataaccess.client&gt;
      &lt;version number="*"&gt;
        &lt;edmMappings&gt;
          &lt;edmNumberMapping&gt;
            &lt;add NETType="int32" MinPrecision="1" MaxPrecision="1" DBType="Number" /&gt;
            &lt;add NETType="int32" MinPrecision="2" MaxPrecision="3" DBType="Number" /&gt;
            &lt;add NETType="int32" MinPrecision="4" MaxPrecision="5" DBType="Number" /&gt;
            &lt;add NETType="int32" MinPrecision="6" MaxPrecision="10" DBType="Number" /&gt;
            &lt;add NETType="int64" MinPrecision="11" MaxPrecision="19" DBType="Number" /&gt;
          &lt;/edmNumberMapping&gt;
        &lt;/edmMappings&gt;
        &lt;dataSources&gt;
          &lt;dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " /&gt;
        &lt;/dataSources&gt;
      &lt;/version&gt;
    &lt;/oracle.manageddataaccess.client&gt;
  </code></pre>
  
  <p>I tried different things in this block, but nothing changes. Is there something else I need to configure?</p>