Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 3bef2d1

Browse files
committed
Add SqlColumnRaw() and SqlTableRaw() ext methods for getting unquoted db names
1 parent 72144b5 commit 3bef2d1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/ServiceStack.OrmLite/OrmLiteUtilExtensions.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,21 @@ public static string SqlColumn(this string columnName)
158158
return OrmLiteConfig.DialectProvider.GetQuotedColumnName(columnName);
159159
}
160160

161+
public static string SqlColumnRaw(this string columnName)
162+
{
163+
return OrmLiteConfig.DialectProvider.NamingStrategy.GetColumnName(columnName);
164+
}
165+
161166
public static string SqlTable(this string tableName)
162167
{
163168
return OrmLiteConfig.DialectProvider.GetQuotedTableName(tableName);
164169
}
165170

171+
public static string SqlTableRaw(this string tableName)
172+
{
173+
return OrmLiteConfig.DialectProvider.NamingStrategy.GetTableName(tableName);
174+
}
175+
166176
public static string SqlValue(this object value)
167177
{
168178
return "{0}".SqlFmt(value);

0 commit comments

Comments
 (0)