Silverlight Sample (Data Abstract)

From RemObjects Wiki

Jump to:navigation, search
.NET Platform Header-48.png

This is a Data Abstract for .NET Samples topic
Feel free to add your notes to this topic below.


Contents

Purpose

This sample shows how to use the RemObjects SDK and Data Abstract Silverlight libraries, to create a full featured data aware Silverlight application.

DataAbstractSilverlightSample1.png

This application uses DA LINQ for obtaining and updating data.

Also, this sample provides good examples of using asynchronous methods for calling service methods and obtaining results.

To implement Silverlight applications, you have to use the special RemObjects assemblies that can be found in the '\RemObjects Software\RemObjects SDK for .NET\Bin\Silverlight\' and '\RemObjects Software\Data Abstract for .NET\Bin\Silverlight\' folders.
Please ensure that your project has the correct references to these assemblies.

Examine the code

var q = (from x in linqRemoteDataAdapter.GetTable<Clients>() select x);
IQueryable[] Queries = new IQueryable[] { q };
linqRemoteDataAdapter.BeginExecute(
   Queries,
   delegate(IAsyncResult ar)
   {
     linqRemoteDataAdapter.EndExecute(ar);
     Dispatcher.BeginInvoke(new ProcessSelectClientsResultCb(ProcessSelectClientsResult), q.ToList<Clients>());
   },
null);

linqRemoteDataAdapter.UpdateRow(sender as Clients);

When all changes have to be changed, the asynchronous call for ApplyChanges method is performed:

linqRemoteDataAdapter.BeginApplyChanges(
   delegate(IAsyncResult ar)
   {
     linqRemoteDataAdapter.EndApplyChanges(ar);
   }, null);

Getting started

Editions and Languages

Note: because Silverlight support is available in Visual Studio 2008 and above only, it does not ship in the version for Visual Studio 2005.

Concepts Covered


See Also


Da-48.png

Product: RemObjects Data Abstract
Available Editions: Data Abstract for .NET, Delphi and Xcode

GlossaryArchitectureArticlesFeaturesLibrarySamples

Navigation
products
hubs
special
Toolbox