WithSql异常
#1267
Replies: 2 comments 1 reply
-
3.2.665版本 |
Beta Was this translation helpful? Give feedback.
0 replies
-
你没有看 ado 文档。 如果用的 freesql.provider.mysql.dll:var sql = "select * from haha where id=?id"; 如果用的 freesql.provider.mysqlconnector.dll:var sql = "select * from haha where id=@id"; 因为两个引用的驱动不一样。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
var sql = "select * from haha where id=@id";
var rs = await _freeSql.Select().WithSql(sql, new { id = "123456" }).ToListAsync();
难道只有我遇到这个问题,还是使用姿势不对
MySqlException: Parameter '@id' must be defined.
Beta Was this translation helpful? Give feedback.
All reactions