public IHttpActionResult Get([FromODataUri] Color key) { EnumCustomer customer = new EnumCustomer { ID = 9, Color = key, Colors = new List <Color> { Color.Blue, Color.Red } }; return(Ok(customer)); }
public IHttpActionResult Post(EnumCustomer customer) { return(Ok(customer)); }
public IHttpActionResult Get([FromODataUri]Color key) { EnumCustomer customer = new EnumCustomer { ID = 9, Color = key, Colors = new List<Color> { Color.Blue, Color.Red } }; return Ok(customer); }
public IHttpActionResult Post(EnumCustomer customer) { return Ok(customer); }
public IHttpActionResult Get([FromODataUri] EdmEnumObject key) { EnumCustomer customer = new EnumCustomer { ID = 9, Color = (Color)Enum.Parse(typeof(Color), key.Value), Colors = new List<Color> { Color.Blue, Color.Red } }; return Ok(customer); }