-
Dapper
- Getting Started
- Methods
- Parameters
- Result
- Utilities
-
Dapper Plus
- Getting Started
- Methods
-
Dapper Transaction
- Getting Started
-
Dapper Contrib
- Getting Started
- Methods
- Data Annotations
Dapper Tutorial Dapper - Parameter List
Description
Dapper allow you to specify multiple parameter on a IN clause by using a list.
var sql = "SELECT * FROM Invoice WHERE Kind IN @Kind;"; using (var connection = My.ConnectionFactory()) { connection.Open(); var invoices = connection.Query<Invoice>(sql, new {Kind = new[] {InvoiceKind.StoreInvoice, InvoiceKind.WebInvoice}}).ToList(); }