IErpService Interface
Provides the interface for working with an ERP Service.
Namespace: powerGate.Erp.Client
Assembly: powerGate.Erp.Client.dll
Syntax
1 | public interface IErpService : IDisposable |
Properties
Type |
Name |
Description |
|---|---|---|
EntitySets |
Gets all entity sets defined by the service. |
|
EntityTypes |
Gets all entity types defined by the service. |
|
ComplexTypes |
Gets all complex types defined by the service. |
|
Operations |
Gets all OData actions and functions defined by the service. |
|
|
IsAvailable |
Indicates whether the service is available. |
|
Name |
The name of the service. |
Url |
The Url of the service. |
Methods
Type |
Name |
Description |
|---|---|---|
|
InvokeErpOperation(string operationName, Dictionary<string, object> parameters = null) |
Invokes an unbound OData action or function with the specified name and parameters. Additional parts of the namespace can be included in |
|
Dispose() |
Disconnects the service from the ErpClient. Also Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.(Inherited from IDisposable.) |
Remarks
An OData action or function can be either bound or unbound. The service exposes unbound actions and functions through InvokeErpOperation(), while bound actions and functions are typically invoked through an IErpEntitySet or an ErpObject.
When calling Dispose() the service is disconnected from the ErpClient.
If the service is a CatalogService, the CatalogService and all its known services get disconnected.
Examples
Invoking an unbound action
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | using System; using powerGate.Erp.Client; namespace ErpServiceSample { class Program { static void Main(string[] args) { using (var erpclient = new ErpClient()) { using (var service = erpclient.ConnectErp(new Uri("https://services.odata.org/TripPinRESTierService/"))) service.InvokeErpOperation("ResetDataSource"); } } } } |
See also
Reference