I'm using multiple mapping for a current query and now I need to map another object on the initial query.
For example:
public class Part { public int Id { get; set; } public string Name { get; set; } public Address Address { get; set; } } public class Address { public int Id { get; set; } public string Street { get; set; } public SiteOu Ou { get; set; } } public class SiteOu public int Id { get; set; } public string Name { get; set; } } Dapper:
connection.Query<Part, Address, Part>(sql, (part, address) => { part.Address = address; }); How do I get the Address class to have the SiteOu information?
This example isn't what I'm actually doing because I've actually got
Query<T1,T2,T3,T4,T5,TResult>(); I'm doing 1 select and 5 joins in my query. So hopefully I don't need more overloads of Query.