//参数直接写参数名
string Sql = "select * from [table] where field like @field";
//参数值里面加上通配符,varchar类型查询也不加单引号
var Param = new {field = "%{ParamValue}%"};
//执行查询
Dapper.Query<T>(Sql,Param);
//参数直接写参数名
string Sql = "select * from [table] where field like @field";
//参数值里面加上通配符,varchar类型查询也不加单引号
var Param = new {field = "%{ParamValue}%"};
//执行查询
Dapper.Query<T>(Sql,Param);