Silverlight RIA Services - Display Columns from Multiple Tables
I am evaluating Silverlight and .NET RIA Services for my company. I'm trying to decide if this is right for us. For the most part, I like it. But, I see one point that I am surprised that I cannot do it easily. Because of this, I am assuming that I am doing something wrong. To demonstrate, I have two database tables:
Order
-----
ID
CustomerID
OrderDate
OrderNumber
Customer
--------
ID
FirstName
LastName
Address
When I create the Domain Service class, I select both of these tables. In a Silverlight application, I drag an Order object from the Data Sources page to the Silverlight page. When I do this, the DataGrid is added with all the properties in the Order object. Actually, I would like the DataGrid to show:
- Order.OrderNumber
- Order.OrderDate
- Customer.FirstName
- Customer.LastName
Since this information is spread across multiple tables, I'm not sure how to use RIA services to expose them in a Silverlight application.
What's the recommended way to do this? Should I add a view to my database? Can I do this without touching the database?
Thanks,
a source to share