Table of Contents

Method AnyEq

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

AnyEq<TItem>(FieldDefinition<TDocument>, TItem)

Creates an equality filter for an array field.

public FilterDefinition<TDocument> AnyEq<TItem>(FieldDefinition<TDocument> field, TItem value)

Parameters

field FieldDefinition<TDocument>

The field.

value TItem

The value.

Returns

FilterDefinition<TDocument>

An equality filter.

Type Parameters

TItem

The type of the item.

AnyEq<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, TItem)

Creates an equality filter for an array field.

public FilterDefinition<TDocument> AnyEq<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>> field, TItem value)

Parameters

field Expression<Func<TDocument, IEnumerable<TItem>>>

The field.

value TItem

The value.

Returns

FilterDefinition<TDocument>

An equality filter.

Type Parameters

TItem

The type of the item.