mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 14:04:44 +08:00
Update EscapeLikeValue
This commit is contained in:
parent
18b2b031f2
commit
a755f9ffdb
@ -18,8 +18,13 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
public class UtilMethods
|
public class UtilMethods
|
||||||
{
|
{
|
||||||
public static string EscapeLikeValue(DbType dbType, string value, char wildcard='%')
|
public static string EscapeLikeValue(ISqlSugarClient db, string value, char wildcard='%')
|
||||||
{
|
{
|
||||||
|
var dbType = db.CurrentConnectionConfig.DbType;
|
||||||
|
if (db.CurrentConnectionConfig?.MoreSettings?.DatabaseModel != null)
|
||||||
|
{
|
||||||
|
dbType = db.CurrentConnectionConfig.MoreSettings.DatabaseModel.Value;
|
||||||
|
}
|
||||||
if (string.IsNullOrEmpty(value))
|
if (string.IsNullOrEmpty(value))
|
||||||
return value;
|
return value;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user