Skip to content

Set Method ​

Definition ​

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

Overloads ​

NameDescription
UpdateSetBuilder<T> Set(Expression<Func<T, T>> initializer)Adds assignments using an object initializer expression.
UpdateSetBuilder<T> Set(ValueTuple<Expression<Func<T, TProp>>, TProp>[] sets)Adds or replaces multiple assignments in the SET clause using mapped property selectors.
UpdateSetBuilder<T> Set(Expression<Func<T, TProp>> selector, TProp value)Adds or replaces a single assignment in the SET clause using a mapped property selector.

UpdateSetBuilder<T> Set(Expression<Func<T, T>> initializer) ​

csharp
UpdateSetBuilder<T> Set(Expression<Func<T, T>> initializer)

Adds assignments using an object initializer expression.

Parameters ​

NameDescription
initializerAn initializer like x =&gt; new T { Name = "Alice", Active = true }.

Returns ​

A new builder including the specified assignments.

Remarks ​

The initializer values are evaluated by compiling each assigned expression. Only constants/closures/statics are allowed; per-row computations that reference the entity parameter are explicitly rejected.

UpdateSetBuilder<T> Set(Expression<Func<T, TProp>> selector, TProp value) ​

csharp
UpdateSetBuilder<T> Set(Expression<Func<T, TProp>> selector, TProp value)

Adds or replaces a single assignment in the SET clause using a mapped property selector.

Type parameters ​

NameDescription
TPropProperty type.

Parameters ​

NameDescription
selectorProperty selector, e.g. x =&gt; x.Name.
valueValue to assign.

Returns ​

A new builder including the assignment.

UpdateSetBuilder<T> Set(ValueTuple<Expression<Func<T, TProp>>, TProp>[] sets) ​

csharp
UpdateSetBuilder<T> Set(ValueTuple<Expression<Func<T, TProp>>, TProp>[] sets)

Adds or replaces multiple assignments in the SET clause using mapped property selectors.

Type parameters ​

NameDescription
TPropProperty type.

Parameters ​

NameDescription
setsProperty/value pairs to assign.

Returns ​

A new builder including the specified assignments.