Class UpdateBase<T>
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: MongoDB.Entities
Assembly: MongoDB.Entities.dll
Syntax
public abstract class UpdateBase<T>
where T : IEntity
Type Parameters
Name | Description |
---|---|
T |
Fields
defs
Declaration
protected readonly List<UpdateDefinition<T>> defs
Field Value
Type | Description |
---|---|
List<UpdateDefinition<T>> |
Methods
AddModification(Template)
Specify an update with a Template to modify the Entities (use multiple times if needed)
Declaration
public void AddModification(Template template)
Parameters
Type | Name | Description |
---|---|---|
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)
Declaration
public void AddModification(Func<UpdateDefinitionBuilder<T>, UpdateDefinition<T>> operation)
Parameters
Type | Name | Description |
---|---|---|
Func<UpdateDefinitionBuilder<T>, UpdateDefinition<T>> | operation | b => b.Inc(x => x.PropName, Value) |
AddModification(String)
Specify an update (json string) to modify the Entities (use multiple times if needed)
Declaration
public void AddModification(string update)
Parameters
Type | Name | Description |
---|---|---|
String | update | { \(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)
Declaration
public void AddModification<TProp>(Expression<Func<T, TProp>> property, TProp value)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<T, TProp>> | property | x => x.Property |
TProp | value | The value to set on the property |
Type Parameters
Name | Description |
---|---|
TProp |