Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dotnet ef dbcontext scaffold: Bug in oracle to C# datatype mapping?

JoelFromBoschMar 27 2020 — edited Mar 29 2020

Hello,

i'm having a hard time to understand the mapping of Oracle datatypes to C# datatypes:

"Actual" is the result in my generated C# Class while "Expected" would be the more comprehensible result from my perspective.

create table Demo

(

  level                   NUMBER(1) not null,      -- Actual: bool     Expected: int

  algorithm               NUMBER(1) default 1,     -- Actual: bool?    Expected: int?

  manipulate_events       NUMBER(1) default 0,     -- Actual: bool?    Expected: int?

  disabled                NUMBER(10) default 0,    -- Actual: int?     Expected: int?

  tp                      NUMBER(10),              -- Actual: int?     Expected: int?

  divisor                 NUMBER,                  -- Actual: decimal? Expected: decimal?

  matrix_x                NUMBER(3),               -- Actual: byte?    Expected: int?

)

Could you eleborate a bit why you choose such a mapping or kindly consider changing it within the next service release?

Tooling:

Oracle.EntityFrameworkCore Version 2.19.60

Microsoft.EntityFrameworkCore Version 2.2.6

Microsoft.EntityFrameworkCore.Relational Version 2.2.6

Microsoft.EntityFrameworkCore.Design Version 2.2.6

Microsoft.EntityFrameworkCore.Tools Version 2.2.6

Kind Regards

a frustrated user of your products

This post has been answered by Alex Keh-Oracle on Mar 27 2020
Jump to Answer
Comments
Post Details
Added on Mar 27 2020
1 comment
775 views