具有两个参数的 Dapper QueryAsync
Dapper QueryAsync with two params
我想知道是否有办法做这样的事情:
string sql = "SELECT * FROM TABLE WHERE ID = @ID AND VALUE = @VALUE";
var listTest = await _dbConnection.QueryAsync<Example>(sql, ID, VALUE);
我想查询 table 与复合 PK。
var listTest = await _dbConnection.QueryAsync<Example>(sql, new { ID, VALUE });
我想知道是否有办法做这样的事情:
string sql = "SELECT * FROM TABLE WHERE ID = @ID AND VALUE = @VALUE";
var listTest = await _dbConnection.QueryAsync<Example>(sql, ID, VALUE);
我想查询 table 与复合 PK。
var listTest = await _dbConnection.QueryAsync<Example>(sql, new { ID, VALUE });