I have a legacy DB running on Oracle which has a few specific internal data representations which need to be converted into more standard data types in my entities. To whit:
Booleans are represented as 0 or 1, which is a NUMBER1. The designer maps the values as Int16, and throws an exception when I want to use an Boolean.
Empty strings in Oracle are represented as single space strings, while an empty string '' is NULL.
What I need is to be able to convert from the DB representation to a CLR representation in the mapping layer, but I can't find any information as to any available handles for this.
Apart from costly workarounds like duplicating all my properties, are there any elegant solutions to the problem?