You can use "Multi-Mapping" feature of Dapper.
[Test]
public void Test_Multi_Mapping()
{
using (var conn = new SqlConnection(@"Data Source=.\sqlexpress; Integrated Security=true; Initial Catalog=test"))
{
var result = conn.Query<Person, Contact, Person>(
"select Id = 1, Name = 'Jane Doe', Id = 2, FoneNumber = '800-123-4567'",
(person, contact) => { person.Contact = contact;
return person;
}).First();
Assert.That(result.Contact.FoneNumber, Is.EqualTo("800-123-4567"));
}
}
You can also use ".QueryMultiple". Read Dapper's documentation, or take a look at the unit tests for more examples.