Ejemplo n.º 1
0
            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));
            }
Ejemplo n.º 2
0
 public IHttpActionResult Post(EnumCustomer customer)
 {
     return(Ok(customer));
 }
Ejemplo n.º 3
0
            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);
 }
Ejemplo n.º 5
0
            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);
            }