Red
Red

Reputation: 15

Silverlight DomainService returning custom class

I'm a relatively new user with silverlight. Here is my situation

I'm using RIA DomainServices for bringing in all my data. I can see, and bind to all the data needed. I have a table that uses lookups to columns in another table for mapping its values.

For ex- In the user profile table, the values for user preferences, gender preferences are looked up from the corresponding columns in another table. Like user preference value 23 is looked up from another table, and corresponding text value has to be displayed

Now since, I don't want to change a lot of things in the project, how do I proceed with the issue? Can I write a custom class that does hard - coded lookups in the get and sets? If yes, how do I proceed to get data from the domainservice for the custom class.

I hope I'm clear with the question

Upvotes: 0

Views: 464

Answers (1)

Juan Carlos Velez
Juan Carlos Velez

Reputation: 2940

You can write your custom class, but you need to do:

  1. Your class must be a primary key (mark a property with the attribute [key]
  2. Create in your domain class a function that query your class.

Upvotes: 2

Related Questions