Skip to content

Commit ca61485

Browse files
committed
Remove NpgsqlDbFunctionsExtensions.Like code
1 parent 8c1df35 commit ca61485

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

Common/Query/DBExpressionBuilderUtils.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ namespace OpenShock.Common.Query;
88
public static class DBExpressionBuilderUtils
99
{
1010
private static readonly MethodInfo EfFunctionsCollateMethodInfo = typeof(RelationalDbFunctionsExtensions).GetMethod("Collate")?.MakeGenericMethod(typeof(string)) ?? throw new MissingMethodException("EF.Functions", "Collate(string,string)");
11-
//private static readonly MethodInfo EfFunctionsLikeMethodInfo = typeof(NpgsqlDbFunctionsExtensions).GetMethod("Like", [typeof(DbFunctions), typeof(string), typeof(string)]) ?? throw new MissingMethodException("EF.Functions", "Like(string,string)");
1211
private static readonly MethodInfo EfFunctionsILikeMethodInfo = typeof(NpgsqlDbFunctionsExtensions).GetMethod("ILike", [typeof(DbFunctions), typeof(string), typeof(string)]) ?? throw new MissingMethodException("EF.Functions", "ILike(string,string)");
1312
private static readonly MethodInfo StringEqualsMethodInfo = typeof(string).GetMethod("Equals", [typeof(string)]) ?? throw new MissingMethodException("string", "Equals(string,StringComparison)");
1413
private static readonly MethodInfo StringStartsWithMethodInfo = typeof(string).GetMethod("StartsWith", [typeof(string)]) ?? throw new MissingMethodException("string", "StartsWith(string)");
@@ -124,18 +123,6 @@ private static ConstantExpression GetConstant(Type type, string value)
124123
}
125124
}
126125

127-
/*
128-
public static MethodCallExpression? BuildEfFunctionsLikeExpression(Type memberType, Expression memberExpr, string value)
129-
{
130-
if (memberType != typeof(string)) return null;
131-
132-
var valueConstant = Expression.Constant(value, typeof(string));
133-
var efFunctionsConstant = Expression.Constant(EF.Functions, typeof(DbFunctions));
134-
135-
return Expression.Call(null, EfFunctionsLikeMethodInfo, efFunctionsConstant, memberExpr, valueConstant);
136-
}
137-
*/
138-
139126
public static MethodCallExpression? BuildEfFunctionsCollatedILikeExpression(Type memberType, Expression memberExpr, string value)
140127
{
141128
if (memberType != typeof(string)) return null;

0 commit comments

Comments
 (0)