mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Update odbc
This commit is contained in:
parent
4bd6218ac1
commit
39c6f2ce32
@ -94,10 +94,20 @@ namespace SqlSugar.Odbc
|
||||
}
|
||||
public override string Contains(MethodCallExpressionModel model)
|
||||
{
|
||||
if (IsSqlServerModel(model))
|
||||
{
|
||||
return base.Contains(model);
|
||||
}
|
||||
var parameter = model.Args[0];
|
||||
var parameter2 = model.Args[1];
|
||||
return string.Format(" ({0} like '%'||{1}||'%') ", parameter.MemberName, parameter2.MemberName);
|
||||
}
|
||||
|
||||
private static bool IsSqlServerModel(MethodCallExpressionModel model)
|
||||
{
|
||||
return model.Conext?.SugarContext?.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.SqlServer;
|
||||
}
|
||||
|
||||
public override string StartsWith(MethodCallExpressionModel model)
|
||||
{
|
||||
var parameter = model.Args[0];
|
||||
|
Loading…
Reference in New Issue
Block a user