Dapper Plus - Bulk Update

UPDATE entities using Bulk Operation.

Example - Update Single

UPDATE a single entity with Bulk Operation.

using (var connection = My.ConnectionFactory())
{
    connection.Open();
    
    connection.BulkUpdate(invoice);
}

Example - Update Many

UPDATE many entities with Bulk Operation.

using (var connection = My.ConnectionFactory())
{
    connection.Open();

    connection.BulkUpdate(invoices);
}

Example - Update with relation (One to One)

UPDATE entities with a one to one relation with Bulk Operation.

using (var connection = My.ConnectionFactory())
{
    connection.Open();
    
    connection.BulkUpdate(invoices, x => x.Detail);
}

Example - Update with relation (One to Many)

UPDATE entities with a one to many relation with Bulk Operation.

using (var connection = My.ConnectionFactory())
{
    connection.Open();

    connection.BulkUpdate(invoices, x => x.Items);
}