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

Validating data: triggering validation when needed

Applies to Silverlight 4, 5

Validation of your data before persisting it is a requirement for almost every application. By using validation on your Entities, you make sure that no invalid data is persisted to your data store. With WCF RIA Services, you've got the option to write validation logic once, and it will be executed both on the client and the server. A lot of this is done automatically: in property setters, on the client before submitting to the server, on the server before submitting to the data store, ... but sometimes, you want to trigger validation exactly when you need it: this is what this recipe is about.

In this recipe, you'll learn to manually trigger validation.

Getting ready ...

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