Up Additional code samples
DevForce Resource Center » Samples » Additional code samples » Code sample: Remote Server Methods (Silverlight)

Code sample: Remote Server Methods (Silverlight)

Last modified on September 26, 2012 17:44

This sample shows the mechanics of passing an EntityCacheState to and from a remote server method.



Problem

You often want to pass one or more entities to or from a remote server method.  You might do this when the server method must perform several synchronous operations to retrieve the data, making it easier to have the client application call only the single server method to retrieve the final results.  You might instead want to send entities from the client to the server method for additional processing.  Whatever your use case, the EntityCacheState makes it easy to pass entities to and from the server.

Solution

The sample solution shows both how to pass an EntityCacheState as an argument to a server method, and how to return an EntityCacheState from a method.  

The sample is intended to show only the mechanics of making these calls.  It does not show you best practices or recommend an appropriate architecture.  Note that using remote server methods is "out-of-band" from the usual DevForce queries and saves, that's why we discuss it here in the Additional techniques section; it's a handy tool for your toolkit but should be used judiciously.


Created by DevForce on December 27, 2011 19:18

This wiki is licensed under a Creative Commons 2.0 license. XWiki Enterprise 3.2 - Documentation. Copyright © 2015 IdeaBlade