
Explanation:
Graphical user interface, text, application Description automatically generated

Step 1: Add the OData v4 client code generator
Install OData Client Code Generator
Step 2: Add the custom OData service endpoints to the ODataClient list
After you downloaded, installed the OData V4 Client Code Generator and restart the Visual Studio you will be able to find and add 'OData Client' item into our project.
Step 3: Generate proxy classes
Step 4: Point the MetaDataDocumentURI variable top the Dynamics 365 Finance instance You need to set MetaDataDocumentURI, which is generated by the OData Code Generator.
Reference:
https://devblogs.microsoft.com/odata/tutorial-sample-how-to-use-odata-client-code-generator-to-generate-client-
https://www.netwoven.com/2018/05/29/how-to-create-client-side-odata-proxy-dll-for-microsoft-dynamics-365-f