HybridDb icon indicating copy to clipboard operation
HybridDb copied to clipboard

Linq and enums

Open asgerhallas opened this issue 9 years ago • 0 comments

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?

asgerhallas avatar Mar 18 '15 07:03 asgerhallas