I have a query that needs about 9 objects that's coming from joins.
select
:
fields
:
from tbl1 t1
join tbl2 t2 on t2.id = t1.id
join tbl3 t3 on t3.id = t1.id
join tbl4 t4 on t4.id = t1.id
join tbl5 t5 on t5.id = t1.id
join tbl6 t6 on t6.id = t1.id
left outer join tbl7 on t7.id = t1.id
left outer join tbl8 on t8.id = t6.id
left outer join tbl9 on t9.id = t1.id
left outer joint tbl10 on t10.id = t9.id
where ...
And would execute as usual
db.Query<poco1, poco2,.... poco10, poco1>(query, (poco1, poco2,.... poco10) => {
return ..stuffs
}).ToList()
The problem with this is that, query only accepts 7. Was wondering what would be another option to get all those objects (9) with one query. If I'm going to use a stored proc, how will I map the data to it's objects?
edit tbl represents the poco, but made changes to make it clear they're poco