Class NPocoSqlExtensions.SqlUpd<TDto>
Creates an SQL UPDATE statement for the specified data transfer object (DTO) type.
Inheritance
object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Infrastructure.dll
Syntax
public class NPocoSqlExtensions.SqlUpd<TDto>
Type Parameters
| Name | Description |
|---|---|
| TDto |
Constructors
View SourceSqlUpd(ISqlContext)
Initializes a new instance of the NPocoSqlExtensions.SqlUpd<TDto> class for the specified DTO type.
Declaration
public SqlUpd(ISqlContext sqlContext)
Parameters
| Type | Name | Description |
|---|---|---|
| ISqlContext | sqlContext | The ISqlContext to use for SQL operations. |
Properties
View SourceSetExpressions
Gets the list of set expressions used in the SQL update statement. Each tuple contains the column name and the value to set for that column.
Declaration
public List<Tuple<string, object?>> SetExpressions { get; }
Property Value
| Type | Description |
|---|---|
| List<Tuple<string, object>> |
Methods
View SourceSet(Expression<Func<TDto, object?>>, object?)
Sets the specified field to the given value for the update operation.
Declaration
public NPocoSqlExtensions.SqlUpd<TDto> Set(Expression<Func<TDto, object?>> fieldSelector, object? value)
Parameters
| Type | Name | Description |
|---|---|---|
| Expression<Func<TDto, object>> | fieldSelector | An expression selecting the field to update. |
| object | value | The value to assign to the selected field. |
Returns
| Type | Description |
|---|---|
| NPocoSqlExtensions.SqlUpd<TDto> | The current NPocoSqlExtensions.SqlUpd<TDto> instance for chaining. |