Skip to main content
A newer version of this page is available. .

SerializableObjectLayerServiceClient Class

A distributed object access layer (an ISerializableObjectLayer implementation) for client applications transferring data via WCF.

Namespace: DevExpress.Xpo.DB

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

public class SerializableObjectLayerServiceClient :
    SerializableObjectLayerServiceClientBase<ISerializableObjectLayerService>

Remarks

Normally, all you have to do is initialize a SerializableObjectLayerServiceClient with a service endpoint in the client application, as shown below.


// (ObjectWcfClient.cs)
class Program {
    static void Main(string[] args) {
        // Creating a distributed object layer based on data retrieved via a WCF service.
        // The service endpoint is obtained from the client application's App.config file.
        ISerializableObjectLayer serializableObjectLayer = new 
            SerializableObjectLayerServiceClient("BasicHttpBinding_ISerializableObjectLayerService");

        // Checking connection.
        serializableObjectLayer.CanLoadCollectionObjects.ToString();

        XpoDefault.DataLayer = null;
        XpoDefault.Session = null;
        // Instantiates an object access layer used to retrieve and update object data 
        // in a data store exposed via a WCF service.
        ObjectHelper.ObjectLayer = new SerializableObjectLayerClient(serializableObjectLayer);

        using(UnitOfWork uow = new UnitOfWork(ObjectHelper.ObjectLayer)) {
            // Object data manipulations.
            // ...
        }
    }
}
public static class ObjectHelper {
    public static IObjectLayer ObjectLayer;
}

For more information on transferring data via WCF services, refer to Transferring Data via WCF Services.

Inheritance

Object
ClientBase<ISerializableObjectLayerService>
DevExpress.Xpo.DB.SerializableObjectLayerServiceClientBase<ISerializableObjectLayerService>
SerializableObjectLayerServiceClient
See Also