RIA Services and multiple/dynamic "Include" strategies

Posted by user326526 on Stack Overflow See other posts from Stack Overflow or by user326526
Published on 2010-04-27T03:44:51Z Indexed on 2010/04/27 4:13 UTC
Read the original article Hit count: 267

Filed under:
|
|
|

As an example, assume the following simple model:

public class Order
{
    public List<LineItem> LineItems { get; set; }
    public List<Fee> Fees { get; set; }
}

public class LineItem { }
public class Fee { }

With RIA Services, if I want to retrieve an Order and include all of it's line items in the same network call, I can statically place an [Include] attribute on the above LineItems collection. This works great for a single scenario, but what happens when I need multiple "include strategies"?

For instance, one situation might call for including the Fees collection and NOT the LineItems collection. Is there any way with RIA Services to control what's included at runtime without redefining your model and/or creating dtos with the attributes statically placed for each use-case?

© Stack Overflow or respective owner

Related posts about RIAServices

Related posts about wcf