Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

dapper query list of parameters

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();
}
Source by dapper-tutorial.net #
 
PREVIOUS NEXT
Tagged: #dapper #query #list #parameters
ADD COMMENT
Topic
Name
6+5 =