DbEntityEntry<TEntity>.Collection 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Collection(String) |
获取一个对象,该对象表示从该实体到相关实体集合的集合导航属性。 |
Collection<TElement>(Expression<Func<TEntity,ICollection<TElement>>>) |
获取一个对象,该对象表示从该实体到相关实体集合的集合导航属性。 |
Collection<TElement>(String) |
获取一个对象,该对象表示从该实体到相关实体集合的集合导航属性。 |
Collection(String)
获取一个对象,该对象表示从该实体到相关实体集合的集合导航属性。
public System.Data.Entity.Infrastructure.DbCollectionEntry Collection (string navigationProperty);
member this.Collection : string -> System.Data.Entity.Infrastructure.DbCollectionEntry
Public Function Collection (navigationProperty As String) As DbCollectionEntry
参数
- navigationProperty
- String
导航属性的名称。
返回
表示导航属性的对象。
适用于
Collection<TElement>(Expression<Func<TEntity,ICollection<TElement>>>)
获取一个对象,该对象表示从该实体到相关实体集合的集合导航属性。
public System.Data.Entity.Infrastructure.DbCollectionEntry<TEntity,TElement> Collection<TElement> (System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.ICollection<TElement>>> navigationProperty) where TElement : class;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Data.Entity.Infrastructure.DbCollectionEntry<TEntity,TElement> Collection<TElement> (System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.ICollection<TElement>>> navigationProperty) where TElement : class;
member this.Collection : System.Linq.Expressions.Expression<Func<'Entity, System.Collections.Generic.ICollection<'Element>>> -> System.Data.Entity.Infrastructure.DbCollectionEntry<'Entity, 'Element (requires 'Entity : null and 'Element : null)> (requires 'Element : null)
Public Function Collection(Of TElement As Class) (navigationProperty As Expression(Of Func(Of TEntity, ICollection(Of TElement)))) As DbCollectionEntry(Of TEntity, TElement)
类型参数
- TElement
集合中的元素类型。
参数
- navigationProperty
- Expression<Func<TEntity,ICollection<TElement>>>
表示导航属性的表达式。
返回
表示导航属性的对象。
- 属性
适用于
Collection<TElement>(String)
获取一个对象,该对象表示从该实体到相关实体集合的集合导航属性。
public System.Data.Entity.Infrastructure.DbCollectionEntry<TEntity,TElement> Collection<TElement> (string navigationProperty) where TElement : class;
member this.Collection : string -> System.Data.Entity.Infrastructure.DbCollectionEntry<'Entity, 'Element (requires 'Entity : null and 'Element : null)> (requires 'Element : null)
Public Function Collection(Of TElement As Class) (navigationProperty As String) As DbCollectionEntry(Of TEntity, TElement)
类型参数
- TElement
集合中的元素类型。
参数
- navigationProperty
- String
导航属性的名称。
返回
表示导航属性的对象。