Method Type
Type(FieldDefinition<TDocument>, BsonType)
Creates a type filter.
public FilterDefinition<TDocument> Type(FieldDefinition<TDocument> field, BsonType type)
Parameters
field
FieldDefinition<TDocument>The field.
type
BsonTypeThe type.
Returns
- FilterDefinition<TDocument>
A type filter.
Type(FieldDefinition<TDocument>, string)
Creates a type filter.
public FilterDefinition<TDocument> Type(FieldDefinition<TDocument> field, string type)
Parameters
field
FieldDefinition<TDocument>The field.
type
stringThe type.
Returns
- FilterDefinition<TDocument>
A type filter.
Type(Expression<Func<TDocument, object>>, BsonType)
Creates a type filter.
public FilterDefinition<TDocument> Type(Expression<Func<TDocument, object>> field, BsonType type)
Parameters
field
Expression<Func<TDocument, object>>The field.
type
BsonTypeThe type.
Returns
- FilterDefinition<TDocument>
A type filter.
Type(Expression<Func<TDocument, object>>, string)
Creates a type filter.
public FilterDefinition<TDocument> Type(Expression<Func<TDocument, object>> field, string type)
Parameters
field
Expression<Func<TDocument, object>>The field.
type
stringThe type.
Returns
- FilterDefinition<TDocument>
A type filter.