Search Results for

    Show / Hide Table of Contents
    View Source

    Class NPocoSqlExtensions.SqlRef<TDto>

    Represents a Dto reference expression.

    Inheritance
    System.Object
    Namespace: Umbraco.Core.Persistence
    Assembly: Umbraco.Core.dll
    Syntax
    public class SqlRef<TDto>
    Type Parameters
    Name Description
    TDto

    The type of the referencing Dto.

    Constructors

    View Source

    SqlRef(Sql<ISqlContext>, String)

    Initializes a new Dto reference expression.

    Declaration
    public SqlRef(Sql<ISqlContext> sql, string prefix)
    Parameters
    Type Name Description
    Sql<ISqlContext> sql

    The original Sql expression.

    System.String prefix

    The current Dtos prefix.

    Properties

    View Source

    Prefix

    Gets the current Dtos prefix.

    Declaration
    public string Prefix { get; }
    Property Value
    Type Description
    System.String
    View Source

    Sql

    Gets the original Sql expression.

    Declaration
    public Sql<ISqlContext> Sql { get; }
    Property Value
    Type Description
    Sql<ISqlContext>

    Methods

    View Source

    Select<TRefDto>(Expression<Func<TDto, TRefDto>>, Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>>)

    Appends fields for a referenced Dto.

    Declaration
    public NPocoSqlExtensions.SqlRef<TDto> Select<TRefDto>(Expression<Func<TDto, TRefDto>> field, Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>> reference = null)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression<System.Func<TDto, TRefDto>> field

    An expression specifying the referencing field.

    System.Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>> reference

    An optional expression representing a nested reference selection.

    Returns
    Type Description
    NPocoSqlExtensions.SqlRef<TDto>

    A SqlRef statement.

    Type Parameters
    Name Description
    TRefDto

    The type of the referenced Dto.

    View Source

    Select<TRefDto>(Expression<Func<TDto, TRefDto>>, String, Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>>)

    Appends fields for a referenced Dto.

    Declaration
    public NPocoSqlExtensions.SqlRef<TDto> Select<TRefDto>(Expression<Func<TDto, TRefDto>> field, string tableAlias, Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>> reference = null)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression<System.Func<TDto, TRefDto>> field

    An expression specifying the referencing field.

    System.String tableAlias

    The referenced Dto table alias.

    System.Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>> reference

    An optional expression representing a nested reference selection.

    Returns
    Type Description
    NPocoSqlExtensions.SqlRef<TDto>

    A SqlRef statement.

    Type Parameters
    Name Description
    TRefDto

    The type of the referenced Dto.

    View Source

    Select<TRefDto>(Expression<Func<TDto, List<TRefDto>>>, Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>>)

    Selects referenced DTOs.

    Declaration
    public NPocoSqlExtensions.SqlRef<TDto> Select<TRefDto>(Expression<Func<TDto, List<TRefDto>>> field, Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>> reference = null)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression<System.Func<TDto, System.Collections.Generic.List<TRefDto>>> field

    An expression specifying the referencing field.

    System.Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>> reference

    An optional expression representing a nested reference selection.

    Returns
    Type Description
    NPocoSqlExtensions.SqlRef<TDto>

    A referenced DTO expression.

    Type Parameters
    Name Description
    TRefDto

    The type of the referenced DTOs.

    Remarks

    The referencing property has to be a List{TRefDto}.

    View Source

    Select<TRefDto>(Expression<Func<TDto, List<TRefDto>>>, String, Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>>)

    Selects referenced DTOs.

    Declaration
    public NPocoSqlExtensions.SqlRef<TDto> Select<TRefDto>(Expression<Func<TDto, List<TRefDto>>> field, string tableAlias, Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>> reference = null)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression<System.Func<TDto, System.Collections.Generic.List<TRefDto>>> field

    An expression specifying the referencing field.

    System.String tableAlias

    The DTO table alias.

    System.Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>> reference

    An optional expression representing a nested reference selection.

    Returns
    Type Description
    NPocoSqlExtensions.SqlRef<TDto>

    A referenced DTO expression.

    Type Parameters
    Name Description
    TRefDto

    The type of the referenced DTOs.

    Remarks

    The referencing property has to be a List{TRefDto}.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • SqlRef(Sql<ISqlContext>, String)
    • Properties
      • Prefix
      • Sql
    • Methods
      • Select<TRefDto>(Expression<Func<TDto, TRefDto>>, Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>>)
      • Select<TRefDto>(Expression<Func<TDto, TRefDto>>, String, Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>>)
      • Select<TRefDto>(Expression<Func<TDto, List<TRefDto>>>, Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>>)
      • Select<TRefDto>(Expression<Func<TDto, List<TRefDto>>>, String, Func<NPocoSqlExtensions.SqlRef<TRefDto>, NPocoSqlExtensions.SqlRef<TRefDto>>)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX