src/Shared/EntityFramework/ModelConfiguration/Configuration/Properties/Navigation/HasX/ManyNavigationPropertyConfiguration.cs
/// <summary>
/// Configures the relationship to be many:many with a navigation property on the other side of the relationship.
/// </summary>
/// <param name="navigationPropertyExpression"> An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty </param>
/// <returns> A configuration object that can be used to further configure the relationship. </returns>
Configures the relationship to be many:many with a navigation property on the other side of the relationship.
Configures the relationship to be many : many with a navigation property on the other side of the relationship .
[SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
        [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
        public ManyToManyNavigationPropertyConfiguration<TEntityType, TTargetEntityType> WithMany(
            Expression<Func<TTargetEntityType, ICollection<TEntityType>>> navigationPropertyExpression)
        {
            Check.NotNull(navigationPropertyExpression, "navigationPropertyExpression");
            _navigationPropertyConfiguration.InverseNavigationProperty
                = navigationPropertyExpression.GetSimplePropertyAccess().Single();
            return WithMany();
        }
[ SuppressMessage ( " " , " " ) ] [ SuppressMessage ( " " , " " ) ] public ManyToManyNavigationPropertyConfiguration < TEntityType , TTargetEntityType > WithMany ( Expression < Func < TTargetEntityType , ICollection < TEntityType > > > navigationPropertyExpression ) { Check . NotNull ( navigationPropertyExpression , " " ) ; _navigationPropertyConfiguration . InverseNavigationProperty = navigationPropertyExpression . GetSimplePropertyAccess ( ) . Single ( ) ; return WithMany ( ) ; }
Configures the relationship to be many:many with a navigation property on the other side of the relationship.
Configures the relationship to be many : many with a navigation property on the other side of the relationship .
A configuration object that can be used to further configure the relationship.
A configuration object that can be used to further configure the relationship .
navigationPropertyExpression
Expression<Func<TTargetEntityType, ICollection<TEntityType>>>
An lambda expression representing the navigation property on the other end of the relationship.
An lambda expression representing the navigation property on the other end of the relationship .