Click here to Skip to main content
15,171,576 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello, I am writing a Silverlight application in visual studio 2010 and have my data in sqlserver 2008. I use Linq to sqlclasses on the webserver side which I expose to silverlight client through silverlight enabled wcf web service. Then i bind the proxy class members (that i get through service reference) to UI silverlight controls. I want to validate the user input in these controls whether it is textboxes datetimepickers grids e.t.c. I have read many articles about implementing the IDataErrorInfo interface in the class that i wish to bind e.t.c. Problem is that i do not bind to a class written by me.linq to sql class code is autogenerated. I bind to the proxy class (that is a linq to sql class exposed by a wcf service). I tried writing my validation rules in the designer of the dbml file in the in the "set" section of the properties(columns). I also tried implementing IDataErrorInfo interface in the designer file but neither approach validates user input in the UI. What can I do?
Posted

1 solution

The problem is the class attributes arent passed through to the auto generated client proxy, i think the precribed method is to have the models in a seperate assembly and reference it in the server and client apps.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900