How Do I Change the Dialect in Dapper Extensions?
c#, dapper, postgresql
Solution
The solution is:
DapperExtensions.DapperExtensions.SqlDialect = new PostgreSqlDialect();
Please note that the dialect must be manually set for asynchronous extensions as well:
DapperExtensions.DapperAsyncExtensions.SqlDialect = new PostgreSqlDialect();
Problem
By default, the RDBMS dialect for dapper extensions is SqlServer. How do I change this to another dialect? I've figured I can do: (I'm just quickly throwing together a pgsql dialect) ` var conf = new DapperExtensionsConfiguration(typeof(AutoClassMapper<>), new List<Assembly>(), new DapperExtensions.Sql.PostgreSqlDialect()); ` but what do I do with this conf? Do I set it to the connection or to a static method somewhere? Thanks