EdmFunctions.Trim Method (DbExpression)

 

Creates a DbFunctionExpression that invokes the canonical 'Trim' function with the specified argument, which must have a string result type. The result type of the expression is also string.

Namespace:   System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder
Assembly:  EntityFramework (in EntityFramework.dll)

public static DbFunctionExpression Trim(
	this DbExpression stringArgument
)

Parameters

stringArgument
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

An expression that specifies the string from which leading and trailing space should be removed.

Return Value

Type: System.Data.Entity.Core.Common.CommandTrees.DbFunctionExpression

A new DbFunctionExpression that returns value of stringArgument with leading and trailing space removed.

Exception Condition
ArgumentNullException

stringArgument is null.

ArgumentException

No overload of the canonical 'Trim' function accepts an argument with the result type of stringArgument.