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