Interface IEntityUpdateSpec<TTarget, TBuilder>
F-bounded base for entity-UPDATE-builder fluent chains. Declares the chain methods that
are common to standalone Update (IEntityUpdateSpec<TTarget>) and the
Upsert UPDATE branch (IUpsertUpdateSpec<TTarget>); each leaf interface
substitutes itself as TBuilder so chain methods return the correct
concrete builder type.
public interface IEntityUpdateSpec<TTarget, TBuilder> where TTarget : notnull where TBuilder : IEntityUpdateSpec<TTarget, TBuilder>
Type Parameters
TTargetTarget table record type.
TBuilderConcrete leaf builder type (F-bound: must derive from this interface with itself substituted).
- Extension Methods
Remarks
This interface is used only as the receiver type of an expression tree captured by linq2db. The configure expression is parsed by linq2db and is not invoked; implementing this interface is not a supported extension point.
Methods
Ignore<TV>(Expression<Func<TTarget, TV>>)
Excludes a target column from the UPDATE statement.
TBuilder Ignore<TV>(Expression<Func<TTarget, TV>> field)
Parameters
fieldExpression<Func<TTarget, TV>>
Returns
- TBuilder
Type Parameters
TV
Set<TV>(Expression<Func<TTarget, TV>>, Expression<Func<TTarget, TTarget, TV>>)
Sets a target column's value during UPDATE from both the current target row and the source row.
TBuilder Set<TV>(Expression<Func<TTarget, TV>> field, Expression<Func<TTarget, TTarget, TV>> value)
Parameters
fieldExpression<Func<TTarget, TV>>valueExpression<Func<TTarget, TTarget, TV>>
Returns
- TBuilder
Type Parameters
TV
Set<TV>(Expression<Func<TTarget, TV>>, Expression<Func<TTarget, TV>>)
Sets a target column's value during UPDATE from the source row.
TBuilder Set<TV>(Expression<Func<TTarget, TV>> field, Expression<Func<TTarget, TV>> value)
Parameters
fieldExpression<Func<TTarget, TV>>valueExpression<Func<TTarget, TV>>
Returns
- TBuilder
Type Parameters
TV
Set<TV>(Expression<Func<TTarget, TV>>, Expression<Func<TV>>)
Sets a target column's value during UPDATE from a context-free expression.
TBuilder Set<TV>(Expression<Func<TTarget, TV>> field, Expression<Func<TV>> value)
Parameters
fieldExpression<Func<TTarget, TV>>valueExpression<Func<TV>>
Returns
- TBuilder
Type Parameters
TV