Enum in WCF RIA Services Object
- by Blake Blackwell
Is it possible to have an enum with WCF RIA Services? When I check the generated code for my custom POCO class I don't see the enum property generated. Here is an example of what I'm trying to do:
public class Legend
{
public enum ViewStateType
{
OnExpanded = 1,
OnContracted = 2,
OffExpanded = 3,
OffContracted = 4
}
[Key]
public Guid LegendId
{
get;
set;
}
[EnumDataType(typeof(ViewStateType))]
public ViewStateType ViewState
{
get;
set;
}
}
I tried with and without the EnumDataType attribute.