📜  dapper 查询参数列表 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:10.951000             🧑  作者: Mango

代码示例2
var sql = "SELECT * FROM Invoice WHERE Kind IN @Kind;";

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

    var invoices = connection.Query(sql, new {Kind = new[] {InvoiceKind.StoreInvoice, InvoiceKind.WebInvoice}}).ToList();
}