Show/Hide Toolbars

TMS Aurelius Documentation

Returns the index value of the first character in a specified substring that occurs in a given string.

 

Example:

 

  // Return entities only if the position of "@" character 
  //in the EMailAddress property is higher than 5
  .Where(Linq['EmailAddress'].Position('@') > 5)

 

The parameter is the substring to be searched for. The result is the index of the first occurrence of the string, 1-based. In other words, if the substring occurs in the first character, the result is 1. If the substring is not found, result is 0.

 

Equivalent code which passes the projection/property name as the first parameter:

 

  // Return entities only if the position of "@" character 
  //in the EMailAddress property is higher than 5
  .Where(Linq.GreaterThan(TProjections.Position('@''EmailAddress'), 5)))