Skip to content

OData Service Initialization

In order to communicate with an OData service, you must first define a .service file. This file represents the OData service definition. You must provide the DestinationName that has been mapped to your mobile services app. If the destination is not mapped to the root of your OData service, you can define a path suffix using PathSuffix.

To define whether a particular service should be online only or offline-enabled, set the OfflineEnabled property:

  • To configure a service for online mode, set OfflineEnabled in the .service file to false. In this case, the client app communicates directly with the OData service. You can configure your apps to perform reads and updates to synchronize the client data.
  • To configure a service for offline mode, set OfflineEnabled in the .service file to true. In this case, the client app communicates with the OData service via the offline OData provider. You can configure your apps to initialize a data store and synchronize it with the OData service.

You can also specify additional properties, such as Headers, OnlineOptions, or OfflineOptions.

For more details, see the OData Service API Reference

Initializing Offline OData

Before you can use an OData service in your Mobile Development Kit app, you must first initialize it. Use the OData Service Initialize action to initialize your OData service.

For an offline-enabled OData service, you must also specify the defining requests in the .service definition.

For more details, see Offline OData Initialization And Synchronization


Last update: May 17, 2022