Dapper Contrib - Delete

Description

DELETE a single or many entities.

Example - Delete Single

DELETE a single entitiy.

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

var isSuccess = connection.Delete(new Invoice {InvoiceID = 1});
}

Example - Delete Many

DELETE many entities.

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

var list = new List<Invoice>()
{
new Invoice {InvoiceID = 1},
new Invoice {InvoiceID = 2},
new Invoice {InvoiceID = 3}
};

var isSuccess = connection.Delete(list);
}