Enum Implementation Doesn't recognize most basic use case

Topics: General, OData Library, WCF Data Services
Aug 27, 2014 at 12:15 PM
The most often used use case for an enum is a drop down combo control.

The combo control will always be bound to the int value (at least on a web app) of the enum, not the full namespace value. The reason why this is, is because that's how it will get serialized back to the database.

The problem is that the new implementation of $filter requires the whole namespace which the combo box can't know. It is no longer possible (it was in V3) to filter an enum by its int.

More specifically, grids such as Kendo's and others that support odata now break on their built in filtering because they have the int value in the data source, and generate a map based on that value in the db and display based on a map provided. This can't happen, because there are effectively 2 values: The int and the namespace value.

(incidentally this makes doing logical And and logical Ors more difficult as well)
Sep 29, 2014 at 5:17 PM