-
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 - String Parameter
Description
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); }