I have a legacy application that until now has worked quite nicely with Microsoft's deprecated System.Data.OracleClient driver. C# boolean values are generally represented in its Oracle database as Number(5,0). For years this has worked quite serenely.
We are now attempting to migrate to Oracle's Managed ODP.Net replacement, and Booleans are proving particularly troublesome. Having replaced the Microsoft driver with the Oracle ODP.Net nuget package, I find that write operations with sql such as "insert.. where mybooleancolumn = true" (or parameterised equivalents) throw an 'undefined datatype' exception, and reading boolean values from the database ("Select mybooleancolumn from ....") gives all sort of errors when the values are assigned to C# booleans.
How do others overcome this problem? Is there some additional mapping that needs to be done?