Dil

EntityFrameworkQueryableExtensions.ThenInclude Yöntem

Tanım

Aşırı Yüklemeler

ThenInclude<TEntity,TPreviousProperty,TProperty>(IIncludableQueryable<TEntity, IEnumerable<TPreviousProperty>>, Expression<Func<TPreviousProperty, TProperty>>)

Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs

Yeni eklenen ilgili türe bağlı olarak ek eklenecek ek ilgili verileri belirtir.

public static Microsoft.EntityFrameworkCore.Query.IIncludableQueryable<TEntity,TProperty> ThenInclude<TEntity,TPreviousProperty,TProperty>(this Microsoft.EntityFrameworkCore.Query.IIncludableQueryable<TEntity,System.Collections.Generic.IEnumerable<TPreviousProperty>> source, System.Linq.Expressions.Expression<Func<TPreviousProperty,TProperty>> navigationPropertyPath) where TEntity : class;
static member ThenInclude : Microsoft.EntityFrameworkCore.Query.IIncludableQueryable<'Entity, seq<'PreviousProperty> (requires 'Entity : null)> * System.Linq.Expressions.Expression<Func<'PreviousProperty, 'Property>> -> Microsoft.EntityFrameworkCore.Query.IIncludableQueryable<'Entity, 'Property (requires 'Entity : null)> (requires 'Entity : null)
<Extension()>
Public Function ThenInclude(Of TEntity As Class, TPreviousProperty As Class, TProperty As Class) (source As IIncludableQueryable(Of TEntity, IEnumerable(Of TPreviousProperty)), navigationPropertyPath As Expression(Of Func(Of TPreviousProperty, TProperty))) As IIncludableQueryable(Of TEntity, TProperty)

Tür Parametreleri

TEntity

Sorgulanan varlığın türü.

TPreviousProperty

Yeni eklenen varlığın türü.

TProperty

Dahil edilecek ilgili varlığın türü.

Parametreler

source
IIncludableQueryable<TEntity,IEnumerable<TPreviousProperty>>

Kaynak sorgu.

navigationPropertyPath
Expression<Func<TPreviousProperty,TProperty>>

Dahil edilecek gezinti özelliğini temsil eden lambda ifadesi (t => t.Property1).

Döndürülenler

İlgili verilerin dahil olduğu yeni bir sorgu.

Örnekler

Aşağıdaki sorguda tek bir ilişkili varlık düzeyi dahil olmak üzere gösterilir:

context.Blogs.Include(blog => blog.Posts)

Aşağıdaki sorgu, aynı daldaki iki varlık düzeyinin dahil olduğunu gösterir:

context.Blogs
   .Include(blog => blog.Posts).ThenInclude(post => post.Tags)

Aşağıdaki sorgu, ilgili verilerin birden çok düzeyini ve dalını içerir:

context.Blogs
   .Include(blog => blog.Posts).ThenInclude(post => post.Tags).ThenInclude(tag => tag.TagInfo)
   .Include(blog => blog.Contributors)

Aşağıdaki sorguda, aynı daldaki iki varlık düzeyi, ikincisi türetilen türetme kullanılarak türetilmiş türde olmak üzere iki varlık düzeyi gösterilmektedir:

context.Blogs.Include(blog => blog.Posts).ThenInclude(post => ((SpecialPost)post).SpecialTags)

Aşağıdaki sorguda aynı daldaki iki varlık düzeyi, ikincisi işleci kullanılarak as türetilmiş türde olmak üzere iki düzey gösterilmektedir.

context.Blogs.Include(blog => blog.Posts).ThenInclude(post => (post as SpecialPost).SpecialTags)

Açıklamalar

Daha fazla bilgi ve örnek için bkz . İlgili varlıkları yükleme .

Şunlara uygulanır

ThenInclude<TEntity,TPreviousProperty,TProperty>(IIncludableQueryable<TEntity,TPreviousProperty>, Expression<Func<TPreviousProperty,TProperty>>)

Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs
Kaynak:
EntityFrameworkQueryableExtensions.cs

Yeni eklenen ilgili türe bağlı olarak ek eklenecek ek ilgili verileri belirtir.

public static Microsoft.EntityFrameworkCore.Query.IIncludableQueryable<TEntity,TProperty> ThenInclude<TEntity,TPreviousProperty,TProperty>(this Microsoft.EntityFrameworkCore.Query.IIncludableQueryable<TEntity,TPreviousProperty> source, System.Linq.Expressions.Expression<Func<TPreviousProperty,TProperty>> navigationPropertyPath) where TEntity : class;
static member ThenInclude : Microsoft.EntityFrameworkCore.Query.IIncludableQueryable<'Entity, 'PreviousProperty (requires 'Entity : null)> * System.Linq.Expressions.Expression<Func<'PreviousProperty, 'Property>> -> Microsoft.EntityFrameworkCore.Query.IIncludableQueryable<'Entity, 'Property (requires 'Entity : null)> (requires 'Entity : null)
<Extension()>
Public Function ThenInclude(Of TEntity As Class, TPreviousProperty As Class, TProperty As Class) (source As IIncludableQueryable(Of TEntity, TPreviousProperty), navigationPropertyPath As Expression(Of Func(Of TPreviousProperty, TProperty))) As IIncludableQueryable(Of TEntity, TProperty)

Tür Parametreleri

TEntity

Sorgulanan varlığın türü.

TPreviousProperty

Yeni eklenen varlığın türü.

TProperty

Dahil edilecek ilgili varlığın türü.

Parametreler

source
IIncludableQueryable<TEntity,TPreviousProperty>

Kaynak sorgu.

navigationPropertyPath
Expression<Func<TPreviousProperty,TProperty>>

Dahil edilecek gezinti özelliğini temsil eden lambda ifadesi (t => t.Property1).

Döndürülenler

İlgili verilerin dahil olduğu yeni bir sorgu.

Örnekler

Aşağıdaki sorguda tek bir ilişkili varlık düzeyi dahil olmak üzere gösterilir:

context.Blogs.Include(blog => blog.Posts)

Aşağıdaki sorgu, aynı daldaki iki varlık düzeyinin dahil olduğunu gösterir:

context.Blogs.Include(blog => blog.Posts).ThenInclude(post => post.Tags)

Aşağıdaki sorgu, ilgili verilerin birden çok düzeyini ve dalını içerir:

context.Blogs
   .Include(blog => blog.Posts).ThenInclude(post => post.Tags).ThenInclude(tag => tag.TagInfo)
   .Include(blog => blog.Contributors)

Aşağıdaki sorguda, aynı daldaki iki varlık düzeyi, ikincisi türetilmiş türde olmak üzere gösterilmiştir:

context.Blogs.Include(blog => blog.Posts).ThenInclude(post => ((SpecialPost)post).SpecialTags)

Aşağıdaki sorguda, aynı daldaki iki varlık düzeyi, ikincisi alternatif yöntem kullanılarak türetilmiş türde olmak üzere gösterilir.

context.Blogs.Include(blog => blog.Posts).ThenInclude(post => (post as SpecialPost).SpecialTags)

Açıklamalar

Daha fazla bilgi ve örnek için bkz . İlgili varlıkları yükleme .

Şunlara uygulanır

ThenInclude<TEntity,TPreviousProperty,TProperty>(IIncludableQueryable<TEntity, ICollection<TPreviousProperty>>, Expression<Func<TPreviousProperty, TProperty>>)

Yeni eklenen ilgili türe bağlı olarak ek eklenecek ek ilgili verileri belirtir.

public static Microsoft.EntityFrameworkCore.Query.IIncludableQueryable<TEntity,TProperty> ThenInclude<TEntity,TPreviousProperty,TProperty>(this Microsoft.EntityFrameworkCore.Query.IIncludableQueryable<TEntity,System.Collections.Generic.ICollection<TPreviousProperty>> source, System.Linq.Expressions.Expression<Func<TPreviousProperty,TProperty>> navigationPropertyPath) where TEntity : class;
static member ThenInclude : Microsoft.EntityFrameworkCore.Query.IIncludableQueryable<'Entity, System.Collections.Generic.ICollection<'PreviousProperty> (requires 'Entity : null)> * System.Linq.Expressions.Expression<Func<'PreviousProperty, 'Property>> -> Microsoft.EntityFrameworkCore.Query.IIncludableQueryable<'Entity, 'Property (requires 'Entity : null)> (requires 'Entity : null)
<Extension()>
Public Function ThenInclude(Of TEntity As Class, TPreviousProperty As Class, TProperty As Class) (source As IIncludableQueryable(Of TEntity, ICollection(Of TPreviousProperty)), navigationPropertyPath As Expression(Of Func(Of TPreviousProperty, TProperty))) As IIncludableQueryable(Of TEntity, TProperty)

Tür Parametreleri

TEntity

Sorgulanan varlığın türü.

TPreviousProperty

Yeni eklenen varlığın türü.

TProperty

Dahil edilecek ilgili varlığın türü.

Parametreler

source
IIncludableQueryable<TEntity,ICollection<TPreviousProperty>>

Kaynak sorgu.

navigationPropertyPath
Expression<Func<TPreviousProperty,TProperty>>

Dahil edilecek gezinti özelliğini temsil eden lambda ifadesi (t => t.Property1).

Döndürülenler

İlgili verilerin dahil olduğu yeni bir sorgu.

Örnekler

Aşağıdaki sorguda tek bir ilişkili varlık düzeyi dahil gösterilmektedir.

context.Blogs.Include(blog => blog.Posts);

Aşağıdaki sorgu, aynı daldaki iki varlık düzeyinin dahil olduğunu gösterir.

context.Blogs
    .Include(blog => blog.Posts).ThenInclude(post => post.Tags);

Aşağıdaki sorgu, ilgili verilerin birden çok düzeyini ve dalını içerir.

context.Blogs
    .Include(blog => blog.Posts).ThenInclude(post => post.Tags).ThenInclude(tag => tag.TagInfo)
    .Include(blog => blog.Contributors);

Şunlara uygulanır