i am working on a legacy oracle database that uses character literals T and F in the database for its boolean values however i would like the Entity property to reflect a proper boolen value is there a wy to convert this value when the model is binding it is a read only database so inserts are not important
Share
I would suggest wrapping up or extending the generating type to add this sort of functionality …
entity framework will generate objects that basically match what the data in the database tables looks like so if you have a table called “Contacts” you’ll get an object called “Contacts”, I think (although i could be wrong) the classes are defined as partial so it generates something like …
you then add a new property like this …
Now when you declare a Contact instance just fish the value from “MyBool” instead.
…
That’s extending, wrapping up would be something like this …
similar thing … just need to consume the object slightly differently 🙂