Search found 1 match

by DeepDiver
Tue 14 Apr 2009 13:56
Forum: dotConnect for Oracle
Topic: Custom DataType Mapping ...
Replies: 1
Views: 1496

Custom DataType Mapping ...

Hi,

I'm currently evaluating dotConnect for Oracle and I have one question:

Is it possible to perform custom data type mapping?

Allow me to give you an example:
There is a column defined as char(1) NOT NULL, which will hold Y or N.
In the Entity Developer this is mapped to System.String.
I want to change the type - well lets call it class YesNo.
To get the correct value written to the database I just override ToString() and return Y or N.
But on reading the data from the database I get an InvalidcastException.
implicit and/or explicit conversion operators from string don't help.

Any idea?

THX alot,

Tom

PS: Allow me to congratulate you for this cool product! ;-)