public static ICriterion ProcessIsLike(MethodCallExpression methodCallExpression)
        {
            ExpressionProcessor.ProjectionInfo projection = ExpressionProcessor.FindMemberProjection(methodCallExpression.Arguments[0]);
            object value = ExpressionProcessor.FindValue(methodCallExpression.Arguments[1]);

            return(projection.CreateCriterion(Restrictions.Like, Restrictions.Like, value));
        }
Exemple #2
0
 /// <summary>
 /// A case-insensitive "like", similar to Postgres "ilike" operator
 /// </summary>
 public TReturn IsInsensitiveLike(object value)
 {
     return(Add(projection.CreateCriterion(Restrictions.InsensitiveLike, Restrictions.InsensitiveLike, value)));
 }