WCF DS June CTP does not support enums RRS feed

  • Question

  • June CTP of EF introduced enum support so it is possible to specify properties of enum types in model and enums will be generated alongside entity classes. But WCF DS June CTP release doesn't seem to support it. I've put together the simplest example of an issue I face:


    Running it will give this:

    The server encountered an error processing the request. The exception message is 'Value cannot be null. Parameter name: propertyResourceType'. See server logs for more details. The exception stack trace is:

    at System.Data.Services.Providers.ResourceProperty..ctor(String name, ResourcePropertyKind kind, ResourceType propertyResourceType) at System.Data.Services.Providers.ObjectContextServiceProvider.PopulateMemberMetadata(ResourceType resourceType, IProviderMetadata workspace, IDictionary`2 knownTypes, PrimitiveResourceTypeMap

    Studying ObjectContextServiceProvider.PopulateMemberMetadata method I've learned that there's no handling for enum types leading to propertyResourceType not even being assigned properly. For the record - I've tried specifically loading metadata workspace and it had no effect. Also, changing type of Type property to Int32 solves the problem.

    Is there a plan to address it in the near future and possibly a time when to expect the solution?

    • Edited by Maxim Hortman Wednesday, September 14, 2011 8:30 AM added clarification
    Wednesday, September 14, 2011 8:28 AM

All replies

  • Hi Maxim,

    We do not currently have a detailed timeline for enum support.

    Notice: A majority of the data services questions have been posted in the release forum so we’re shutting down the pre-release forum to consolidate to the release forum for practicality.

    Abhiram Chivukula

    Program Manager

    WCF Data Services

    Friday, March 9, 2012 11:01 PM