I have a RESTful Web API project, and I have 2 different Enum scenarios that I\'m unsure of re best practice.
Scenario 1 : Straightforward Enum Param
For scenario 2 there is built in support in C# for Bitmask operations in Enums using the [Flags] attribute
[Flags]
public enum OptionalField
{
None = 0,
RuleOwner = 1,
Rule = 2,
RuleAdministrator = 4,
RuleEditor = 8,
...etc
}
Which is described in this SO post
As Christian already stated in his answer it's probably not good practice to use this in a REST API but it should work.