Open IFetisov opened 6 years ago
Hello,
This example may help you: https://github.com/doc212/dapper-issue-1151/blob/master/Program.cs
It's taken mostly from here (One to Many) https://dapper-tutorial.net/result-multi-mapping
If it does not help you, could you clarify what you mean by :
But it returns in collection duplicate records
And maybe provide a more complete example
Also I think this kind of question fits better in StackOverflow (but that's just my opinion)
Cheers.
Hello. I'm beginner and don't know fuctionality of this great component. Can someone help me with reading data to object model
May be I should do so? var x = multi.Read<Order, Detail, Order>((o, d) => { o.Details.Add(d); return o; }, splitOn:"OrderId"); But it returns in collection duplicate records