Search Results for

    Show / Hide Table of Contents
    View Source

    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 Source

    SqlUpd(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 Source

    SetExpressions

    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 Source

    Set(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.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX