We are using Entity Framework and dotConnect for Oracle.
We have legacy data which uses CHAR(1) fields with Y/N values to store booleans and require a way in which we can map these to .Net native bool properties, and importantly we need to perform queries based on these fields.
- Option 1: Create a partial class and add a bool wrapper property. Not acceptable because cannot query
- Option 2: Create views over the top of our tables to translate Y/N into 1/0 and map our entities to the views. Not acceptable because we have many tables and do not want the overhead of managing these extra views, with associated insert/update triggers.
- Option 3: Create Model-Defined Functions (MDF) as per http://msdn.microsoft.com/en-us/library/dd456845.aspx
Option 3 works perfectly, however we have found that performing any action using Entity Developer on the model deletes our functions from the .EDML file.
Is there any way to prevent Entity Developer from deleting these functions from the .EDML? Is there any chance that dotConnect for Oracle will natively support Y/N bool fields?
Regards,
Israel