dapper like 模糊查询

 var name="张";
var sql = "select * from goods where name like @name ";
var res = conn.Query<Goods>(sql, new { @name = name + '%' }).ToList();

 

posted @ 2022-12-29 20:31  lunawzh  阅读(302)  评论(0编辑  收藏  举报