Enum in WCF RIA Services Object
Posted
by Blake Blackwell
on Stack Overflow
See other posts from Stack Overflow
or by Blake Blackwell
Published on 2010-05-03T15:15:06Z
Indexed on
2010/05/03
15:18 UTC
Read the original article
Hit count: 1144
wcf-ria-services
|.net-4.0
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.
© Stack Overflow or respective owner