You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Dapper.SimpleCRUD/SimpleCRUD.cs
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,12 @@ public static void SetDialect(Dialect dialect)
54
54
_getIdentitySql=string.Format("SELECT LAST_INSERT_ROWID() AS id");
55
55
_getPagedListSql="Select {SelectColumns} from {TableName} {WhereClause} Order By {OrderBy} LIMIT {RowsPerPage} OFFSET (({PageNumber}-1) * {RowsPerPage})";
56
56
break;
57
+
caseDialect.MySQL:
58
+
_dialect=Dialect.MySQL;
59
+
_encapsulation="`{0}`";
60
+
_getIdentitySql=string.Format("SELECT LAST_INSERT_ID() AS id");
61
+
_getPagedListSql="Select {SelectColumns} from {TableName} {WhereClause} Order By {OrderBy} LIMIT {RowsPerPage} OFFSET (({PageNumber}-1) * {RowsPerPage})";
62
+
break;
57
63
default:
58
64
_dialect=Dialect.SQLServer;
59
65
_encapsulation="[{0}]";
@@ -777,7 +783,8 @@ public enum Dialect
777
783
{
778
784
SQLServer,
779
785
PostgreSQL,
780
-
SQLite
786
+
SQLite,
787
+
MySQL,
781
788
}
782
789
783
790
}
@@ -920,4 +927,4 @@ public static bool IsSimpleType(this Type type)
0 commit comments