Using OData data generator, how to choose which objects should have proxy classes?

I successfully generated OData client code using this generator to access my Dynamics CRM WebApi services. Unfortunately, for the vanilla organization, he created a ~ 30 MB cs file. This is the path to the big, because all I need is access to several entities.

I know that I can upload metadata for the OData service and manually edit it before running the generator, but I'm looking for a way that is more convenient for developers.

I was looking for a way to restrict metadata directly, but it seems that the xml metadata file is static: Getting $ metadata for a specific collection or object using Odata Web Services in Microsoft Dynamics NAV 2016

What is the best way to create proxy classes for only some objects?

EDIT : I actually tried to manually edit the metadata file by deleting the EntityType nodes and the corresponding EntitySets, but the tool complained about some IEdm interface ... is still unresolved.

+4
source share
1 answer

I believe that the recommended way to prevent data objects from appearing through the ODATA layer is to set the "Public" property to false for the object in Dynamics 365.

; - TT, OData VS 2012, 50 . , Visual Studio .

D365 2000 , , .

SQL- , .

+1

Source: https://habr.com/ru/post/1661487/


All Articles