views:

55

answers:

2

Hi, I'm developing application that use nHibernate for ORM, WCF services and silverlight as UI. My question is how to provide validation on server and also on client for domain entities. I thought using nHibernate validation framework but not sure if I can use it as client (silverlight) validation. I don't want to have two codes of validation and like to use nHibernate validation. Any idea?

Tnx!

A: 

That's what the WCF RIA Services and the System.ServiceModel.DataAnnotation attributes can be used for.

Michael S. Scherotter
Yes but I'm not using RIA services.. WCF.
Damir R.
A: 

You'r validation can be handled by a ViewModel implementing INotifyDataErrorInfo interface. And that interface also provides the grounds you need for building your own asynchronous validation which will be needed for server side validation.

Einarsson