EntityFrameworkQueryableExtensions.ThenInclude Yöntem

Tanım

Aşırı Yüklemeler

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

Yeni eklenen ilgili bir türe göre daha fazla eklenecek ek verileri belirtir.

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

Yeni eklenen ilgili bir türe göre daha fazla eklenecek ek verileri belirtir.

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

Yeni eklenen ilgili bir türe göre daha fazla eklenecek ek verileri belirtir.

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

Yeni eklenen ilgili bir türe göre daha fazla eklenecek ek 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ık 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 bir lambda ifadesi (t = > t. Property1).

Döndürülenler

IIncludableQueryable<TEntity,TProperty>

İlgili veriler dahil yeni bir sorgu.

Örnekler

Aşağıdaki sorgu, tek düzeyli ilgili varlıkların de dahil olduğunu gösterir.

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

Aşağıdaki sorgu, aynı dalda 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ı dahil gösterir.

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

Şunlara uygulanır

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

Yeni eklenen ilgili bir türe göre daha fazla eklenecek ek 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ık 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 bir lambda ifadesi (t = > t. Property1).

Döndürülenler

IIncludableQueryable<TEntity,TProperty>

İlgili veriler dahil yeni bir sorgu.

Örnekler

Aşağıdaki sorgu, tek düzeyli ilgili varlıkların de dahil olduğunu gösterir:

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

Aşağıdaki sorgu, aynı dalda iki varlık düzeyi dahil göstermektedir:

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

Aşağıdaki sorgu, ilgili verilerin birden çok düzeyini ve dalını dahil göstermektedir:

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

Aşağıdaki sorgu, aynı dalda iki tür varlık dahil, ikinci bir tane de atama kullanılarak türetilmiş türde olan ' ı gösterir:

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

Aşağıdaki sorgu aynı dalda iki tür varlık dahil olmak üzere ikinci bir işleç kullanılarak türetilmiş türde olan ' ı gösterir as .

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

Açıklamalar

Daha fazla bilgi için bkz. ilgili varlıkları yükleme .

Şunlara uygulanır

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

Yeni eklenen ilgili bir türe göre daha fazla eklenecek ek 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ık 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 bir lambda ifadesi (t = > t. Property1).

Döndürülenler

IIncludableQueryable<TEntity,TProperty>

İlgili veriler dahil yeni bir sorgu.

Örnekler

Aşağıdaki sorgu, tek düzeyli ilgili varlıkların de dahil olduğunu gösterir:

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

Aşağıdaki sorgu, aynı dalda iki varlık düzeyi dahil göstermektedir:

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

Aşağıdaki sorgu, ilgili verilerin birden çok düzeyini ve dalını dahil göstermektedir:

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

Aşağıdaki sorgu, aynı dalda iki tür varlık dahil olmak üzere ikinci bir tane türetilmiş türde olan ' ı gösterir:

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

Aşağıdaki sorgu aynı dalda iki farklı varlık düzeyi dahil, ikinci diğeri de alternatif yöntemi kullanarak türetilmiş tür olarak göstermektedir.

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

Açıklamalar

Daha fazla bilgi için bkz. ilgili varlıkları yükleme .

Şunlara uygulanır