The following should work:
var result = conn.Query(
"select code, name from mytable where id = ?id? order by name",
new { id = 1 });
More Related Contents:
- Microsoft.ACE.OLEDB.12.0 provider is not registered
- Manually map column names with class properties
- OleDbCommand parameters order and priority
- Microsoft.Jet.OLEDB.4.0′ provider is not registered on the local machine
- Fastest way to perform nested bulk inserts with scope_identity() usage?
- Reading excel file using OLEDB Data Provider
- OleDbParameters and Parameter Names
- SELECT * FROM X WHERE id IN (…) with Dapper ORM
- How do I map lists of nested objects with Dapper
- Is there a way to call a stored procedure with Dapper?
- Does Dapper support SQL 2008 Table-Valued Parameters?
- How to implement Generic Repository Design Pattern with Dapper?
- Dapper.NET and stored proc with multiple result sets
- Parsing CSV using OleDb using C#
- Searching values via a datagridview
- Trying to insert DateTime.Now into Date/Time field gives “Data type mismatch” error
- VBScript & Access MDB – 800A0E7A – “Provider cannot be found. It may not be properly installed”
- How do I perform an insert and return inserted identity with Dapper?
- How can I import an Excel file into SQL Server? [closed]
- Bulk inserts taking longer than expected using Dapper
- Optimal way to Read an Excel file (.xls/.xlsx)
- Closing connection when using Dapper
- How do I handle Database Connections with Dapper in .NET?
- Is there any way to trace\log the sql using Dapper?
- Is there a “proper” way to read CSV files [duplicate]
- Access 2007 – INSERT and instant SELECT doesn’t retrieve the inserted data
- Dapper and anonymous Types
- When reading a CSV file using a DataReader and the OLEDB Jet data provider, how can I control column data types?
- Why Entity Framework performs faster than Dapper in direct select statement [closed]
- Does Microsoft OLE DB Provider for SQL Server support TLS 1.2