Search code examples
c#dotconnect

Control datatype assignment for auto generated code


I am using DotConnect by Devart Oracle Edition Professional 8.4.215.0 to access tables in an Oracle database. I'm running into an issue where the auto generated code is interpreting NUMBER(3,0) data type as a boolean. I intended it to be values from 0 to 9.

Is there a way to force the auto generated code construction to assign these as integers rather than boolean?

Edit

I manually changed them in the Designer.cs file and it seems to be working without a hitch, but I would prefer not editing this file.


Solution

    1. You are using Database-First approach (model is generated basing on a predefined database), aren't you?
    2. Default mapping for Database-First approach can be customized in the following way:
      • via the Tools > Options > Servers' Options > Oracle menu (applied only for Entity Developer, *.edml)
      • using the Number Mappings connection string parameter (applied only for EDM Wizard, *.edmx)

    We recommend you to use Entity Developer (the Devart Entity Model item, *.edml) instead of EDM Designer (the ADO.NET Entity Data Model item, *.edmx) because it is adjusted for working with Oracle and has an advanced functionality: http://www.devart.com/entitydeveloper/ed-vs-edm.html .

    Does this help?