views:

27

answers:

0

I am using .NET's RIA services/LinqToSql to expose my data to a Silverlight 3 client. In the database, an Item table has more than one association to another table, User. As an example, the Item table has both CreatedByUser and ModifiedByUser fields. When I use the RIA services wizard to create my DomainService (and metadata), I find that the ItemMetadata class has User1 and User2 fields (typed as users). It has CreatedByUser and ModifiedByUser fields as well, but they are typed as ints.

The result is a client side object model that's difficult to understand. When working with an Item entity, I'm forced to access User1 and User2 when I need the CreatedByUser and ModifiedByUser (respectively). Any ideas how I can solve this problem?