Page 1 of 1

EF Core scaffold table with number(1) maps to c# bool

Posted: Wed 10 Jun 2020 08:51
Hi,

When scafollding an oracle db with ef core devart's provider a table with column number(1) becomes bool on c#. On my C# side when inserting a row entering true or false becomes 0 or 1 on oracle, but the correct value from the DB's perspective is 0(false) -1(true). What is the logic behind this, how devart knows that this column should be mapped as bool? Shouldn't it be mapped as a short instead of bool? Is there any way to change this behavior?

Thanks

Re: EF Core scaffold table with number(1) maps to c# bool

Posted: Thu 11 Jun 2020 13:55
by Shalex
You can change default number mapping by adding "Number Mappings = (Integer, 1, 1, System.Int16);" to your connection string.

Refer to https://www.devart.com/dotconnect/oracl ... tring.html.