Table of Contents

Class UpdateBase<T>

Namespace
MongoDB.Entities
Assembly
MongoDB.Entities.dll
[SuppressMessage("ReSharper", "MemberCanBeProtected.Global")]
public abstract class UpdateBase<T> where T : IEntity

Type Parameters

T
Inheritance
UpdateBase<T>
Derived
Inherited Members

Fields

Defs

protected readonly List<UpdateDefinition<T>> Defs

Field Value

List<UpdateDefinition<T>>

Methods

AddModification(Template)

Specify an update with a Template to modify the Entities (use multiple times if needed)

public void AddModification(Template template)

Parameters

template Template

A Template with a single update

AddModification(Func<UpdateDefinitionBuilder<T>, UpdateDefinition<T>>)

Specify the update definition builder operation to modify the Entities (use multiple times if needed)

public void AddModification(Func<UpdateDefinitionBuilder<T>, UpdateDefinition<T>> operation)

Parameters

operation Func<UpdateDefinitionBuilder<T>, UpdateDefinition<T>>

b => b.Inc(x => x.PropName, Value)

AddModification(string)

Specify an update (json string) to modify the Entities (use multiple times if needed)

public void AddModification(string update)

Parameters

update string

{ \(set: { 'RootProp.\)[x].SubProp' : 321 } }

AddModification<TProp>(Expression<Func<T, TProp>>, TProp)

Specify the property, and it's value to modify (use multiple times if needed)

public void AddModification<TProp>(Expression<Func<T, TProp>> property, TProp value)

Parameters

property Expression<Func<T, TProp>>

x => x.Property

value TProp

The value to set on the property

Type Parameters

TProp