30% OFF - 9th Anniversary discount on new purchases until December 15 with code: ZZZANNIVERSARY9
Dapper Plus Include Actions
Include Actions
The Dapper Plus Include method allows resolving issues with multiple "ThenBulk[Action]" method.
Example
Without include method (The invoice cannot be chained to last action)
Without include Example
connection.BulkInsert(orders) .ThenInsert(order => order.Items) .ThenInsert(orderItem => orderItem.Metas) // Oops! The related invoice cannot be chained. //.ThenInsert(orderItemMeta => ...);
With include method
With include Example
connection.BulkInsert(orders) .Include(x => x.ThenInsert(order => order.Items) .ThenInsert(orderItem => orderItem.Metas)) .Include(x => x.ThenInsert(order => order.Invoice) .ThenInsert(Invoice => invoice.Items));
ZZZ Projects