Show / Hide Table of Contents

Method CreateChildAsync

| Improve this Doc View Source

CreateChildAsync<TChild>(Func<T, TChild>, DbSet<TChild>, CancellationToken)

Creates child query from DbSet.

Declaration
public Task<DbQuery<TChild>> CreateChildAsync<TChild>(Func<T, TChild> getChildModel, DbSet<TChild> sourceData, CancellationToken ct = default(CancellationToken))

    where TChild : Model, new()
Parameters
Type Name Description
System.Func<T, TChild> getChildModel

The delegate to get child model.

DbSet<TChild> sourceData

The source DbSet.

System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<DbQuery<TChild>>

The child query.

Type Parameters
Name Description
TChild

Type of child model.

| Improve this Doc View Source

CreateChildAsync<TChild>(Func<T, TChild>, Action<DbQueryBuilder, TChild>, CancellationToken)

Creates child query from query builder.

Declaration
public Task<DbQuery<TChild>> CreateChildAsync<TChild>(Func<T, TChild> getChildModel, Action<DbQueryBuilder, TChild> buildQuery, CancellationToken ct = default(CancellationToken))

    where TChild : Model, new()
Parameters
Type Name Description
System.Func<T, TChild> getChildModel

The delegate to get child model.

System.Action<DbQueryBuilder, TChild> buildQuery

The query builder.

System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<DbQuery<TChild>>

The child query.

Type Parameters
Name Description
TChild

Type of child model.

| Improve this Doc View Source

CreateChildAsync<TChild>(Action<TChild>, Func<T, TChild>, DbSet<TChild>, CancellationToken)

Creates child query from DbSet.

Declaration
public Task<DbQuery<TChild>> CreateChildAsync<TChild>(Action<TChild> initializer, Func<T, TChild> getChildModel, DbSet<TChild> sourceData, CancellationToken ct = default(CancellationToken))

    where TChild : Model, new()
Parameters
Type Name Description
System.Action<TChild> initializer

The child model initializer.

System.Func<T, TChild> getChildModel

The delegate to get child model.

DbSet<TChild> sourceData

The source DbSet.

System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<DbQuery<TChild>>

The child query.

Type Parameters
Name Description
TChild

Type of child model.

| Improve this Doc View Source

CreateChildAsync<TChild>(Action<TChild>, Func<T, TChild>, Action<DbQueryBuilder, TChild>, CancellationToken)

Creates child query from query builder.

Declaration
public Task<DbQuery<TChild>> CreateChildAsync<TChild>(Action<TChild> initializer, Func<T, TChild> getChildModel, Action<DbQueryBuilder, TChild> buildQuery, CancellationToken ct = default(CancellationToken))

    where TChild : Model, new()
Parameters
Type Name Description
System.Action<TChild> initializer

The child model initializer.

System.Func<T, TChild> getChildModel

The delegate to get child model.

System.Action<DbQueryBuilder, TChild> buildQuery

The query builder.

System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<DbQuery<TChild>>

The child query.

Type Parameters
Name Description
TChild

Type of child model.

| Improve this Doc View Source

CreateChildAsync<TChild>(Func<T, TChild>, Action<DbAggregateQueryBuilder, TChild>, CancellationToken)

Creates child query from aggregate query builder.

Declaration
public Task<DbQuery<TChild>> CreateChildAsync<TChild>(Func<T, TChild> getChildModel, Action<DbAggregateQueryBuilder, TChild> buildQuery, CancellationToken ct = default(CancellationToken))

    where TChild : Model, new()
Parameters
Type Name Description
System.Func<T, TChild> getChildModel

The delegate to get child model.

System.Action<DbAggregateQueryBuilder, TChild> buildQuery

The aggregate query builder.

System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<DbQuery<TChild>>

The child query.

Type Parameters
Name Description
TChild

Type of child model.

| Improve this Doc View Source

CreateChildAsync<TChild>(Action<TChild>, Func<T, TChild>, Action<DbAggregateQueryBuilder, TChild>, CancellationToken)

Creates child query from aggregate query builder.

Declaration
public Task<DbQuery<TChild>> CreateChildAsync<TChild>(Action<TChild> initializer, Func<T, TChild> getChildModel, Action<DbAggregateQueryBuilder, TChild> buildQuery, CancellationToken ct = default(CancellationToken))

    where TChild : Model, new()
Parameters
Type Name Description
System.Action<TChild> initializer

The child model initializer.

System.Func<T, TChild> getChildModel

The delegate to get child model.

System.Action<DbAggregateQueryBuilder, TChild> buildQuery

The aggregate query builder.

System.Threading.CancellationToken ct

The async cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<DbQuery<TChild>>

The child query.

Type Parameters
Name Description
TChild

Type of child model.

  • Improve this Doc
  • View Source
Back to top Copyright © Weifen Luo | DevZest