[WebApiConfig.cs] public static void Register(HttpConfiguration config) { . . . . // Create our batch handler and associate it with the OData service. ODataBatchHandler batchHandler = new DefaultODataBatchHandler(GlobalConfiguration.DefaultServer); config.MapODataServiceRoute("odata", "odata", model, batchHandler); config.EnableEnumPrefixFree(enumPrefixFree: true); config.EnsureInitialized(); } |
Thank you very much for answer. This solution works!
In your example code you used Microsoft.AspNet.OData version 5.5.1, I tried using this version too and it works. But when I use version 6.0.0 the method "EnableEnumPrefixFree()" is missing. I can't find why it is missing or maybe now is another way to free the prefixes...