Class NPocoSqlExtensions.SqlRef<TDto>
Represents a Dto reference expression.
Inheritance
Namespace: Umbraco.Extensions
Assembly: Umbraco.Infrastructure.dll
Syntax
public class SqlRef<TDto>
Type Parameters
| Name | Description |
|---|---|
| TDto | The type of the referencing Dto. |
Constructors
View SourceSqlRef(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 SourcePrefix
Gets the current Dtos prefix.
Declaration
public string Prefix { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Sql
Gets the original Sql expression.
Declaration
public Sql<ISqlContext> Sql { get; }
Property Value
| Type | Description |
|---|---|
| Sql<ISqlContext> |
Methods
View SourceSelect<TRefDto>(Expression<Func<TDto, TRefDto>>, Nullable<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<Func<TDto, TRefDto>> | field | An expression specifying the referencing field. |
| System.Nullable<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. |
Select<TRefDto>(Expression<Func<TDto, TRefDto>>, String, Nullable<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<Func<TDto, TRefDto>> | field | An expression specifying the referencing field. |
| System.String | tableAlias | The referenced Dto table alias. |
| System.Nullable<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. |
Select<TRefDto>(Expression<Func<TDto, List<TRefDto>>>, Nullable<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<Func<TDto, List<TRefDto>>> | field | An expression specifying the referencing field. |
| System.Nullable<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}
Select<TRefDto>(Expression<Func<TDto, List<TRefDto>>>, String, Nullable<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<Func<TDto, List<TRefDto>>> | field | An expression specifying the referencing field. |
| System.String | tableAlias | The DTO table alias. |
| System.Nullable<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}