HybridDb
HybridDb copied to clipboard
Linq and enums
In linq expression enums are shown for what they are, numbers. Querying for enums is translated to a query on ints, but we save enums as strings in the database. So we need to find out in which context a constant/constant method call/constant member is used to see if it's expected to be translated to a string representation of an enum.
In the same way should a projection from an enum column represented as string be translated to an enum, if it's not already done by dapper.
Note to self: Should an order by enum, sort by textual representation or numerical?