public bool EnumFunction(int key, [FromODataUri] EdmEnumObject color)
 {
     Assert.NotNull(color);
     Assert.Equal("NS.Color", color.GetEdmType().FullName());
     Assert.Equal("0", color.Value);
     return(true);
 }
        public bool EnumCollectionFunction(int key, [FromODataUri] EdmEnumObjectCollection colors)
        {
            Assert.NotNull(colors);
            IList <IEdmEnumObject> results = colors.ToList();

            Assert.Equal(2, results.Count);

            // #1
            EdmEnumObject color = results[0] as EdmEnumObject;

            Assert.NotNull(color);
            Assert.Equal("NS.Color", color.GetEdmType().FullName());
            Assert.Equal("Red", color.Value);

            // #2
            EdmEnumObject color2 = results[1] as EdmEnumObject;

            Assert.NotNull(color2);
            Assert.Equal("NS.Color", color2.GetEdmType().FullName());
            Assert.Equal("Green", color2.Value);
            return(true);
        }