So if I had a PersonController and a CompanyController and I call http://www.example.com/api/person?id=34 it will return both person and company embed into the person xml like so:
<Person xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Example.Models">
<Name>John Smith</Name>
<PersonId>34</PersonId>
<Company>
<Name>Blah</Name>
</Company>
</Person>
How would this be done in mvc 4 thanks in advance.
Just added this to the code to format the xml the way I wanted to this is person
this is company:
This is my controller
This is all shortened but these are the changes