namespace: Serenity.Data assembly: Serenity.Net.Data
Translates the command text to target connection dialect by replacing brackets ([]), and parameter prefixes (@). If the query already has a dialect set, it uses that instead of the connection one.
public static string Translate(IQueryWithParams query, IDbConnection connection)
parameter | description |
---|---|
query | The sql query. |
connection | The connection to get dialect from. |
Translated query.
- interface IQueryWithParams
- class SqlConversions
namespace: Serenity.Data assembly: Serenity.Net.Data
Translates the command text to target connection dialect by replacing brackets ([]), and parameter prefixes (@).
public static string Translate(string commandText, IDbConnection connection)
parameter | description |
---|---|
commandText | The command text. |
connection | The connection. |
Translated query.
- class SqlConversions
namespace: Serenity.Data assembly: Serenity.Net.Data
Translates the command text to target dialect by replacing brackets ([]), and parameter prefixes (@).
public static string Translate(string commandText, ISqlDialect dialect)
parameter | description |
---|---|
commandText | The command text. |
dialect | The dialect. |
Translated query.
- interface ISqlDialect
- class SqlConversions