O'Reilly logo

Microsoft Silverlight 5 Data and Services Cookbook by Kevin Dockx, Gill Cleeren

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sorting and filtering data on the server

Applies to Silverlight 4 and 5

In almost every application, you'll run into having to enable sorting and/or filtering, for example, instead of fetching all employees from an employee database, you might only want to fetch one specific (set of) employees, order by date of birth.

In this recipe, you'll learn how to achieve this by extending your domain service with extra query operations.

Getting ready

Before getting started, you've got to make sure the correct SDK and assemblies to enable WCF RIA Services are available. Please refer to recipe Setting up a data solution to work with WCF RIA Services for more information.

We're starting from a provided started solution, which you can find in Chapter 11\Sorting_Filtering_Server_Starter\ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required