ManyNavigationPropertyConfiguration<TEntityType,TTargetEntityType>.WithMany Method

Definition

Overloads

WithMany()

Configures the relationship to be many:many without a navigation property on the other side of the relationship.

WithMany(Expression<Func<TTargetEntityType,ICollection<TEntityType>>>)

Configures the relationship to be many:many with a navigation property on the other side of the relationship.

WithMany()

Configures the relationship to be many:many without a navigation property on the other side of the relationship.

public System.Data.Entity.ModelConfiguration.Configuration.ManyToManyNavigationPropertyConfiguration WithMany ();
member this.WithMany : unit -> System.Data.Entity.ModelConfiguration.Configuration.ManyToManyNavigationPropertyConfiguration
Public Function WithMany () As ManyToManyNavigationPropertyConfiguration

Returns

A configuration object that can be used to further configure the relationship.

Applies to

WithMany(Expression<Func<TTargetEntityType,ICollection<TEntityType>>>)

Configures the relationship to be many:many with a navigation property on the other side of the relationship.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public System.Data.Entity.ModelConfiguration.Configuration.ManyToManyNavigationPropertyConfiguration WithMany (System.Linq.Expressions.Expression<Func<TTargetEntityType,System.Collections.Generic.ICollection<TEntityType>>> navigationPropertyExpression);
public System.Data.Entity.ModelConfiguration.Configuration.ManyToManyNavigationPropertyConfiguration WithMany (System.Linq.Expressions.Expression<Func<TTargetEntityType,System.Collections.Generic.ICollection<TEntityType>>> navigationPropertyExpression);
member this.WithMany : System.Linq.Expressions.Expression<Func<'argetEntityType, System.Collections.Generic.ICollection<'EntityType>>> -> System.Data.Entity.ModelConfiguration.Configuration.ManyToManyNavigationPropertyConfiguration
Public Function WithMany (navigationPropertyExpression As Expression(Of Func(Of TTargetEntityType, ICollection(Of TEntityType)))) As ManyToManyNavigationPropertyConfiguration

Parameters

navigationPropertyExpression
Expression<Func<TTargetEntityType,ICollection<TEntityType>>>

An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty
VB.Net: Function(t) t.MyProperty

Returns

A configuration object that can be used to further configure the relationship.

Attributes

Applies to