OptionalNavigationPropertyConfiguration<TEntityType,TTargetEntityType>.WithMany Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WithMany() |
Configures the relationship to be optional:many without a navigation property on the other side of the relationship. |
WithMany(Expression<Func<TTargetEntityType,ICollection<TEntityType>>>) |
Configures the relationship to be optional:many with a navigation property on the other side of the relationship. |
WithMany()
Configures the relationship to be optional:many without a navigation property on the other side of the relationship.
public System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<TEntityType> WithMany ();
member this.WithMany : unit -> System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<'EntityType (requires 'EntityType : null)>
Public Function WithMany () As DependentNavigationPropertyConfiguration(Of TEntityType)
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 optional: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.DependentNavigationPropertyConfiguration<TEntityType> WithMany (System.Linq.Expressions.Expression<Func<TTargetEntityType,System.Collections.Generic.ICollection<TEntityType>>> navigationPropertyExpression);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Data.Entity.ModelConfiguration.Configuration.DependentNavigationPropertyConfiguration<TEntityType> 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.DependentNavigationPropertyConfiguration<'EntityType (requires 'EntityType : null)>
Public Function WithMany (navigationPropertyExpression As Expression(Of Func(Of TTargetEntityType, ICollection(Of TEntityType)))) As DependentNavigationPropertyConfiguration(Of TEntityType)
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
Entity Framework