So I have a small issue with converting a string to a boolean when EF maps to my POCO. I created custom POCOs and I have one that has a boolean property called “IsActive”. But, in the database the tables column “IsActive”, that maps to the POCOs property, is a string. It’s either ‘Y’ or ‘N’.
EF doesn’t like this, so I’m wondering if there’s a way to tell it to convert the string to a boolean through a custom method?? Thanks!
Have not tested it by myself.
Link
Create complex type definition in your edmx.
Create complex type
Now you can do something like this