Dapper Postgresql not in

韩乐湛
2023-12-01

Dapper Postgresql not in

NOT IN等价于<> ALL。

var sql = "SELECT * FROM Invoice WHERE Kind <> ALL(@Kind);";

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

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

参考官网9.22.5. ALL

 类似资料:

相关阅读

相关文章

相关问答