Appearance
Set Method
Definition
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Overloads
| Name | Description |
|---|---|
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
| Name | Description |
|---|---|
initializer | An initializer like x => 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
| Name | Description |
|---|---|
TProp | Property type. |
Parameters
| Name | Description |
|---|---|
selector | Property selector, e.g. x => x.Name. |
value | Value 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
| Name | Description |
|---|---|
TProp | Property type. |
Parameters
| Name | Description |
|---|---|
sets | Property/value pairs to assign. |
Returns
A new builder including the specified assignments.