Class Builders<T>
A collection of builders for creating filter, projection, sort, and update definitions
public class Builders<T>
Type Parameters
TThe type of the documents
- Inheritance
-
Builders<T>
- Inherited Members
Properties
CollectionFilter
A builder for creating filter definitions for collections
public static CollectionFilterBuilder<T> CollectionFilter { get; }
Property Value
Examples
var filter = Builders<DocumentType>.CollectionFilter;
filter = filter.Where(x => x.Name == "NameSearch");
CollectionFindAndRerankSort
A builder for creating sort definitions for the FindAndRerank collection operation
public static CollectionFindAndRerankSortBuilder<T> CollectionFindAndRerankSort { get; }
Property Value
Examples
var sort = Builders<DocumentType>.CollectionFindAndRerankSort;
sort = sort.Hybrid("A tree in the woods");
CollectionSort
A builder for creating sort definitions for collections
public static CollectionSortBuilder<T> CollectionSort { get; }
Property Value
Examples
var sort = Builders<DocumentType>.CollectionSort;
sort = sort.Ascending(x => x.Name);
CollectionUpdate
A builder for creating update definitions for collections
public static UpdateBuilder<T> CollectionUpdate { get; }
Property Value
Examples
var update = Builders<DocumentType>.CollectionUpdate;
update = update.Set(x => x.Name, "NewName");
Projection
A builder for creating projection definitions
public static ProjectionBuilder<T> Projection { get; }
Property Value
Examples
var projection = Builders<DocumentType>.Projection;
projection = projection.Include(x => x.Name);
TableFilter
A builder for creating sort definitions for tables
public static TableFilterBuilder<T> TableFilter { get; }
Property Value
Examples
var sort = Builders<RowType>.TableSort;
sort = sort.Ascending(x => x.Name);
TableIndex
A builder for creating table indexes
var index = Builders.TableIndex.Text();
table.CreateIndex("index_name", r => r.SomeTextProperty, index);
public static TableIndexBuilder TableIndex { get; }
Property Value
TableSort
A builder for creating sort definitions for tables
public static TableSortBuilder<T> TableSort { get; }
Property Value
Examples
var sort = Builders<RowType>.TableSort;
sort = sort.Ascending(x => x.Name);
TableUpdate
A builder for creating update definitions for tables
public static UpdateBuilder<T> TableUpdate { get; }
Property Value
Examples
var update = Builders<RowType>.TableUpdate;
update = update.Set(x => x.Name, "NewName");