Hi David,

Just curious about what was wrong of just putting this validation on your
DomainService class instead of in the entity if you needed access to the
DB.
Also, just another idea, if you really want code run only server side and
you have it on a .shared file you can use #if !SILVERLIGHT to have run only
server side.


Miguel A. Madero Reyes
www.miguelmadero.com (blog)
[email protected]


On Fri, Jun 3, 2011 at 4:36 PM, David Burela <[email protected]> wrote:

> Thought I'd post this tip on custom server side validation in case anyone
> finds it useful.
>
> In a current Silverlight application we had the scenario where we needed to
> validate a data form. When the user entered some data, we needed to run some
> custom validation code against the database to ensure that it was valid.
> Unfortunately standard custom validators that you put into a .shared.cs
> file will not work. As any database logic that you wrote, while working on
> the domain service side, would not be able to compile on the Silverlight
> side.
>
> After a LOT of research, my team came across this blog post by Nikhil
> Kothari (@nikhilk) that describes how you can write custom validation code
> that is ONLY executed server side. This allows you to write code that access
> databases, etc. that cannot be executed client side.
> Nikhil also then goes into more details on how you can get client side UI
> notifications, by adding Asynchronous Validation to the UI.
>
> Here is the link to Nikhil’s blog post
> http://www.nikhilk.net/RIA-Services-Validation.aspx
> -David Burela
>
>
> _______________________________________________
> ozsilverlight mailing list
> [email protected]
> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
>
>
_______________________________________________
ozsilverlight mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

Reply via email to