Class SetPropertyCalls<TSource>
- Namespace
- Microsoft.EntityFrameworkCore.Query
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Supports specifying property and value to be set in ExecuteUpdate method with chaining multiple calls for updating multiple columns.
This type does not have any constructor or implementation since it is used inside LINQ query solely for the purpose of creating expression tree.
public sealed class SetPropertyCalls<TSource>
Type Parameters
TSource
The type of source element on which ExecuteUpdate operation is being applied.
- Inheritance
-
SetPropertyCalls<TSource>
- Inherited Members
Remarks
See Implementation of database providers and extensions and How EF Core queries work for more information and examples.
Methods
SetProperty<TProperty>(Func<TSource, TProperty>, Func<TSource, TProperty>)
Specifies a property and corresponding value it should be updated to in ExecuteUpdate method.
public SetPropertyCalls<TSource> SetProperty<TProperty>(Func<TSource, TProperty> propertyExpression, Func<TSource, TProperty> valueExpression)
Parameters
propertyExpression
Func<TSource, TProperty>A property access expression.
valueExpression
Func<TSource, TProperty>A value expression.
Returns
- SetPropertyCalls<TSource>
The same instance so that multiple calls to SetProperty<TProperty>(Func<TSource, TProperty>, Func<TSource, TProperty>) can be chained.
Type Parameters
TProperty
The type of property.
SetProperty<TProperty>(Func<TSource, TProperty>, TProperty)
Specifies a property and corresponding value it should be updated to in ExecuteUpdate method.
public SetPropertyCalls<TSource> SetProperty<TProperty>(Func<TSource, TProperty> propertyExpression, TProperty valueExpression)
Parameters
propertyExpression
Func<TSource, TProperty>A property access expression.
valueExpression
TPropertyA value expression.
Returns
- SetPropertyCalls<TSource>
The same instance so that multiple calls to SetProperty<TProperty>(Func<TSource, TProperty>, TProperty) can be chained.
Type Parameters
TProperty
The type of property.