RIA Services Showing Nested Objects

I had a problem opening my VIA WCF RIA Service nested object.

An example of business objects (not tied to a database)

public class User { public string Name { get; set; } public Product Product { get; set; } } 

A custom object will appear on my client object, however the product does not. How can i solve this?

+4
source share
5 answers

You can also do this in a query as follows:

 var MyUsers = DataContext.Users.Include("Product").ToList(); 
+1
source

Do you use the [Include] tag in user metadata? He will identify it as information that must be sent over the network.

0
source

If there is no mapping, use the LINQ query: some pseudo code

var user = from u in User Join the product at User.Key = Product.Key
select u;

0
source
 [Include] public Product Product { get; set; } 
0
source

All Articles