我想在mariadb(mysql引擎)中使用dapper fastcrud(dapper中crud操作的dll),但是当我想执行我的代码时,我有语法错误
似乎当fastcrud想要创建查询时,它的默认行为是创建适合sqlserver的查询(例如使用[]),我想改变这个行为来创建类似sqldialetic的查询mysql
如果有人能帮我,我将不胜感激
我的示例代码:
var TrustedZone = db.Get(new TrustedZone { Id = 1 });
错误:
An unhandled exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll
Additional information: You have an error in your SQL syntax;
check the manual that corresponds to your MariaDB server version
for the right syntax to use near
'[Id],[IP],[Title],[Description] FROM [TrustedZones] WHERE [Id]=1' at line 1
1条答案
按热度按时间jutyujz01#
在程序开始时,按如下方式配置dapper.fastcrud: