コード例 #1
0
 /// <inheritdoc/>
 protected override Expression BindSubstring(MethodCallExpression expression)
 {
     LinqStringBuilder.Append("MID(");
     this.Visit(expression.Object);
     LinqStringBuilder.Append(", ");
     this.Visit(expression.Arguments[0]);
     LinqStringBuilder.Append(" + 1, ");
     if (expression.Arguments.Count == 2)
     {
         this.Visit(expression.Arguments[1]);
     }
     else
     {
         LinqStringBuilder.Append(LinqParameters.GetNextParamName());
         LinqParameters.AddParameter(8000);
     }
     LinqStringBuilder.Append(")");
     return(expression);
 }
コード例 #2
0
 /// <summary>
 /// Adds new parameter to the SQL with specified <paramref name="value"/>.
 /// </summary>
 /// <param name="value">The value of the SQL parameter.</param>
 protected void AddParameterWithValue(object value)
 {
     LinqStringBuilder.Append(LinqParameters.GetNextParamName());
     LinqParameters.AddParameter(value);
 }