Disposal of the built-in .NET Core Service client
You can dispose the client explicitly using the Dispose method, or by enclosing your Core Service code in a using statement.
Disposemethod-
To explicitly dispose the client, make the following call:
CoreServiceClient.Dispose();or, when using the Import and Export client:
ImportExportClient.Dispose();
usingmethod-
Alternatively, enclose your client code in a
usingstatement as follows:using(CoreServiceClient client = new CoreServiceClient("ENDPOINTNAME")) { // Insert your Core Service client code here }This causes the client to be disposed after the code has been executed.