Say you create an RIA DomainService and you include a Person (shown below) entity in it, can you access aggregate entities on that object?
For instance, if I have entities like so (keep in mind that this is a naive representation, they are modeled via the EF4 designer):
public class Person
{
string FirstName { get; set; }
PhoneNumber { get; set; }
}
public class PhoneNumber
{
public string AreaCode { get; set; }
public string Trunk { get; set; }
public string Number { get; set; }
}
If I include Person when creating the PeopleDomainService, can the client access the PhoneNumber on it (and modify it)?
You can decorate the PhoneNumber attribute of the Person object with the [Include] attribute. Remember also to include an include statement in your LINQ query when you get a Person object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With