Skip to content

Set Method ​

Definition ​

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

Overloads ​

NameDescription
UpdateSetBuilder<T> Set(Expression<Func<T, T>> initializer)Begins an UPDATE SET clause using an initializer expression.
UpdateSetBuilder<T> Set(ValueTuple<Expression<Func<T, TProp>>, TProp>[] sets)Begins an UPDATE SET clause by assigning multiple values.
UpdateSetBuilder<T> Set(Expression<Func<T, TProp>> selector, TProp value)Begins an UPDATE SET clause by assigning a value to a mapped property.

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

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

Begins an UPDATE SET clause using an initializer expression.

Parameters ​

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

Returns ​

An UpdateSetBuilder`1 used to continue configuring the update.

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

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

Begins an UPDATE SET clause by assigning a value to a mapped property.

Type parameters ​

NameDescription
TPropProperty type.

Parameters ​

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

Returns ​

An UpdateSetBuilder`1 used to continue configuring the update.

Remarks ​

This does not execute anything. Use the returned builder to complete and execute the UPDATE.

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

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

Begins an UPDATE SET clause by assigning multiple values.

Type parameters ​

NameDescription
TPropProperty type.

Parameters ​

NameDescription
setsProperty/value pairs to assign.

Returns ​

An UpdateSetBuilder`1 used to continue configuring the update.