GET request for person returns both person and company in xml format

mq.hidayat

New Member
So if I had a PersonController and a CompanyController and I call www.example.com/api/person?id=34 it will return both person and company embed into the person xml like so:\[code\]<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>\[/code\]How would this be done in mvc 4 thanks in advance.
 
Back
Top