This question is locked. New answers and comments are not allowed.
Hi there,
I am trying to filter using Enum properties and getting an exception.
I want to filter type BasisBaumEntity. The property I would like to filter against is called BewBpflErhaltfaehigKey of type Erhaltfaehigkeit which is an enum (that inherits from byte).
I am creating the filter programatically:
FilterDescriptor filterDescriptor = new FilterDescriptor("BewBpflErhaltfaehigKey", FilterOperator.IsEqualTo, Erhaltfaehigkeit.Kurzfristig
Here is the request as recorded by Fiddler
@
MessageRoot@QueryOptions@
QueryOptionName�whereValue�9(it.BewBpflErhaltfaehigKey==Erhaltfaehigkeit.Kurzfristig)@
QueryOptionName�orderbyValue�it.Nr@
QueryOptionName�takeValue�24@
QueryOptionName�includeTotalCountValue�True@
GetBasisBaumshttp://tempuri.org/
The exception I receive is
Property or field "Erhaltfaehigkeit" is not declared in type in "BasisBaumEntity".
I tried to decorate the Enum with [DataContract] attribute, and decorated the members with [EnumMember]. Still, WCF RIA server side ist trying to locate Erhaltfaehigkeit as a field or property in BasisBaumEntity.
Jeff Handler from the WCF RIA Team states that such filtering should be possible (http://jeffhandley.com/archive/2010/11/19/DomainDataSourceEnumFilters.aspx).
If you wish I can send you the stacktrace of the exception!
I would really appreciate you help on this issue!
Best
I am trying to filter using Enum properties and getting an exception.
I want to filter type BasisBaumEntity. The property I would like to filter against is called BewBpflErhaltfaehigKey of type Erhaltfaehigkeit which is an enum (that inherits from byte).
I am creating the filter programatically:
FilterDescriptor filterDescriptor = new FilterDescriptor("BewBpflErhaltfaehigKey", FilterOperator.IsEqualTo, Erhaltfaehigkeit.Kurzfristig
Here is the request as recorded by Fiddler
@
MessageRoot@QueryOptions@
QueryOptionName�whereValue�9(it.BewBpflErhaltfaehigKey==Erhaltfaehigkeit.Kurzfristig)@
QueryOptionName�orderbyValue�it.Nr@
QueryOptionName�takeValue�24@
QueryOptionName�includeTotalCountValue�True@
GetBasisBaumshttp://tempuri.org/
The exception I receive is
Property or field "Erhaltfaehigkeit" is not declared in type in "BasisBaumEntity".
I tried to decorate the Enum with [DataContract] attribute, and decorated the members with [EnumMember]. Still, WCF RIA server side ist trying to locate Erhaltfaehigkeit as a field or property in BasisBaumEntity.
Jeff Handler from the WCF RIA Team states that such filtering should be possible (http://jeffhandley.com/archive/2010/11/19/DomainDataSourceEnumFilters.aspx).
If you wish I can send you the stacktrace of the exception!
I would really appreciate you help on this issue!
Best