字符串类型参数

由 吾有佳卿 创建, 最后一次修改 2019-04-11

描述

var sql = "SELECT * FROM Invoice WHERE Code = @Code;";

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

    var invoices = connection.Query<Invoice>(sql, new {Code = new DbString {Value = "Invoice_1", IsFixedLength = false, Length = 9, IsAnsi = true}}).ToList();

    My.Result.Show(invoices);
}


以上内容是否对您有帮助:

二维码
建议反馈
二维码