WCF Data Services Feature Suggestions

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

1,022 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Mike FlaskoMike Flasko shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    started  ·  Mark StaffordAdminMark Stafford (PM, DataFx) responded  · 

    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.

    11 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Mark StaffordAdminMark Stafford (PM, DataFx) commented  ·   ·  Flag as inappropriate

        @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. :)

        HTH,
        Mark

      • CharlesCharles commented  ·   ·  Flag as inappropriate

        Is there an ETA as to when we can see working bits with ENUM support implemented? Alpha? Beta? Release?

      • CharlesCharles commented  ·   ·  Flag as inappropriate

        With this item having TOP votes, is there an ETA when we can expect this issue to be resolved?

      • Odd Dahm SælenOdd Dahm Sælen commented  ·   ·  Flag as inappropriate

        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.

      Feedback and Knowledge Base