So I have a badly formatted schema that I can't touch right now because of a lot of legacy code dependencies.
Supposed I have a table Test and it has a column IsValid that is declared type int.
I want the poco domain object to have the proper intent of IsValid as a boolean. When a query is applied in my repository, I want it to resolve correctly in the query.
.Where(o => o.IsValid == true)
should resolve to:
where isvalid = 1
Can the EntityTypeConfiguration map in this manner or will do I have to create a custom expression parser to look for special cases in the repository (which I prefer not to do)? Or is there another way (without exposing multiple properties on the domain object)?
Thanks!