File tree Expand file tree Collapse file tree
MySqlConnectorDapperExample
MySqlConnectorDapperLegacyExample
NpgsqlDapperLegacyExample
SqliteDapperLegacyExample Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,9 +192,10 @@ public virtual string[] GetConstructorStatements()
192192 public virtual string [ ] GetTransactionConstructorStatements ( )
193193 {
194194 return [ .. new List < string >
195- {
196- $ "this.{ Variable . Transaction . AsPropertyName ( ) } = { Variable . Transaction . AsVarName ( ) } ;"
197- } ] ;
195+ {
196+ $ "this.{ Variable . Transaction . AsPropertyName ( ) } = { Variable . Transaction . AsVarName ( ) } ;"
197+ }
198+ . AppendIf ( "Dapper.DefaultTypeMap.MatchNamesWithUnderscores = true;" , Options . UseDapper ) ] ;
198199 }
199200
200201 protected virtual ISet < string > GetConfigureSqlMappings ( )
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ public QuerySql(string connectionString)
3030 private QuerySql ( MySqlTransaction transaction )
3131 {
3232 this . Transaction = transaction ;
33+ Dapper . DefaultTypeMap . MatchNamesWithUnderscores = true ;
3334 }
3435
3536 public static QuerySql WithTransaction ( MySqlTransaction transaction )
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ public QuerySql(string connectionString)
3131 private QuerySql ( MySqlTransaction transaction )
3232 {
3333 this . Transaction = transaction ;
34+ Dapper . DefaultTypeMap . MatchNamesWithUnderscores = true ;
3435 }
3536
3637 public static QuerySql WithTransaction ( MySqlTransaction transaction )
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ public QuerySql(string connectionString)
2626 private QuerySql ( NpgsqlTransaction transaction )
2727 {
2828 this . Transaction = transaction ;
29+ Dapper . DefaultTypeMap . MatchNamesWithUnderscores = true ;
2930 }
3031
3132 public static QuerySql WithTransaction ( NpgsqlTransaction transaction )
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ public QuerySql(string connectionString)
2727 private QuerySql ( NpgsqlTransaction transaction )
2828 {
2929 this . Transaction = transaction ;
30+ Dapper . DefaultTypeMap . MatchNamesWithUnderscores = true ;
3031 }
3132
3233 public static QuerySql WithTransaction ( NpgsqlTransaction transaction )
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ public QuerySql(string connectionString)
2323 private QuerySql ( SqliteTransaction transaction )
2424 {
2525 this . Transaction = transaction ;
26+ Dapper . DefaultTypeMap . MatchNamesWithUnderscores = true ;
2627 }
2728
2829 public static QuerySql WithTransaction ( SqliteTransaction transaction )
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ public QuerySql(string connectionString)
2424 private QuerySql ( SqliteTransaction transaction )
2525 {
2626 this . Transaction = transaction ;
27+ Dapper . DefaultTypeMap . MatchNamesWithUnderscores = true ;
2728 }
2829
2930 public static QuerySql WithTransaction ( SqliteTransaction transaction )
You can’t perform that action at this time.
0 commit comments