Support Enums as Property Types on Entities
have a type on the server that is defined by an Enum with a restricted set of values, I want to be able to expose that through my model and through my data service
Good news: this is coming – and not just on entity types but on complex types as well. Enums are part of the OData v4 protocol. In fact, it was one of the things we argued vociferously for precisely because of the number of votes on this issue.
AdminMark Stafford (PM, DataFx) commented
@All - it's hard to understand why stuff like this takes time to implement sometimes (especially when EF implemented it comparatively quickly). A large part of the reason is simply because protocols take so long to modify. Our v4 train has been in process for nearly two years now, and it's happening comparatively quickly.
That said, it looks like we are still on track to have OData v4 standardized by OASIS later this year (no promises, we at Microsoft are only part of the process). The implementation of enums in our stacks will not come before the protocol is standardized, and will likely actually land sometime after the protocol is standardized. On the plus side, we hear you very clearly on this issue and I've advocated for it a ton at Microsoft because of the feedback both on this forum and elsewhere.
What I can say is that we do have resources working on the feature right now, and the design is clear now that the v4 protocol deals with it. That means I would expect the feature to land either later this year or in the first quarter of next year. Again, no promises but we really want to get this to you and we think you deserve it. :)
Is there an ETA as to when we can see working bits with ENUM support implemented? Alpha? Beta? Release?
Per Clausen commented
Great to hear!
Dave Kerr commented
Cool, great news that it's on the way.
Marc Pike commented
Thanks for the update and listening to us.
With this item having TOP votes, is there an ETA when we can expect this issue to be resolved?
Ricardo Peres commented
Its almost unbelievable that this isn't already implemented!
Lets get this implemented already !!!
Odd Dahm Sælen commented
When a user drags an enum entity from the DataSource to the design surface the default element should be a combobox that have the elements of the enumeration as items in the drop down box. There should be a way to represent the elements as strings in this list. The selected value should be bound to the entity.