Method Set
Set<TDocument, TField>(ListSetFieldDefinitions<TDocument>, FieldDefinition<TDocument, TField>, TField)
Set an additional field to value using a constant.
public static ListSetFieldDefinitions<TDocument> Set<TDocument, TField>(this ListSetFieldDefinitions<TDocument> fields, FieldDefinition<TDocument, TField> field, TField value)
Parameters
fieldsListSetFieldDefinitions<TDocument>The existing ListSetFieldDefinitions.
fieldFieldDefinition<TDocument, TField>The field.
valueTFieldThe value.
Returns
- ListSetFieldDefinitions<TDocument>
The ListSetFieldDefinitions instance with a SetFieldDefinition added.
Type Parameters
TDocumentThe type of the document.
TFieldThe type of the field.
Set<TDocument, TField>(ListSetFieldDefinitions<TDocument>, Expression<Func<TDocument, TField>>, TField)
Set an additional field to value using an Expression to specify the field and a constant to specify the value.
public static ListSetFieldDefinitions<TDocument> Set<TDocument, TField>(this ListSetFieldDefinitions<TDocument> fields, Expression<Func<TDocument, TField>> field, TField value)
Parameters
fieldsListSetFieldDefinitions<TDocument>The existing ListSetFieldDefinitions.
fieldExpression<Func<TDocument, TField>>The field.
valueTFieldThe value.
Returns
- ListSetFieldDefinitions<TDocument>
The ListSetFieldDefinitions instance with a SetFieldDefinition added.
Type Parameters
TDocumentThe type of the document.
TFieldThe type of the field.