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
TSourceThe 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
propertyExpressionFunc<TSource, TProperty>A property access expression.
valueExpressionFunc<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
TPropertyThe 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
propertyExpressionFunc<TSource, TProperty>A property access expression.
valueExpressionTPropertyA value expression.
Returns
- SetPropertyCalls<TSource>
The same instance so that multiple calls to SetProperty<TProperty>(Func<TSource, TProperty>, TProperty) can be chained.
Type Parameters
TPropertyThe type of property.