TechTalk Genome v4.2

Set.Contains Method 

Determines whether an element is in the Set.

public bool Contains(
   object item
);

Parameters

item
The object to locate in the Set.

Return Value

true if item is found in the set; otherwise, false.

Remarks

The method determines efficiently whether an element is in the Set both on the server and on the client side.

Genome will choose the best implementation depending on your set's element type. If the ElementType is a scalar or persistent class that has only one primary key, a SQL "IN" operator is generated with a sub-query expression. If the element type has more than one primary key, than the "EXISTS" SQL operator is used instead.

Example

          
dataDomain.Extent(typeof(Animal))["Name.IsLike({0}) || {1}.Inhabitants.Contains(this)", "A%", cage];
          

Requirements

Namespace: TechTalk.Genome

Assembly: TechTalk.Genome (in TechTalk.Genome.dll)

Version: 4.2.4.4

Editions: Professional, Evaluation, Express

See Also

Set Class | TechTalk.Genome Namespace | Sql.IsIn | Sql.IsIn