Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/325.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在Dapper FastCRUD中创建mysql查询_C#_Mysql_Mariadb_Dapper_Dapper Fastcrud - Fatal编程技术网

C# 在Dapper FastCRUD中创建mysql查询

C# 在Dapper FastCRUD中创建mysql查询,c#,mysql,mariadb,dapper,dapper-fastcrud,C#,Mysql,Mariadb,Dapper,Dapper Fastcrud,我想将dapper fastcrud(用于dapper中CRUD操作的DLL)与mariadb(mysql引擎)一起使用,但是 当我想执行我的代码时,我有语法错误 当fastcrud想要创建查询时,它的默认行为是 正在创建适合sqlserver的查询(例如使用[]),我想对此进行更改 创建查询mysql的行为 类似sqldialetic的东西 如果有人能帮助我,我将不胜感激 我的示例代码: var TrustedZone = db.Get(new TrustedZone { Id = 1 });

我想将dapper fastcrud(用于dapper中CRUD操作的DLL)与mariadb(mysql引擎)一起使用,但是 当我想执行我的代码时,我有语法错误

当fastcrud想要创建查询时,它的默认行为是 正在创建适合sqlserver的查询(例如使用[]),我想对此进行更改 创建查询mysql的行为 类似sqldialetic的东西

如果有人能帮助我,我将不胜感激

我的示例代码:

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

在程序开始时,按如下方式配置Dapper.FastCRUD:

OrmConfiguration.DefaultDialect = SqlDialect.MySql;