@@ -14,7 +14,7 @@ public interface INavigation : INavigationBase
14
14
/// <summary>
15
15
/// Gets the entity type that this navigation property belongs to.
16
16
/// </summary>
17
- IEntityType INavigationBase . DeclaringEntityType
17
+ new IEntityType DeclaringEntityType
18
18
{
19
19
[ DebuggerStepThrough ]
20
20
get => IsOnDependent ? ForeignKey . DeclaringEntityType : ForeignKey . PrincipalEntityType ;
@@ -23,7 +23,7 @@ IEntityType INavigationBase.DeclaringEntityType
23
23
/// <summary>
24
24
/// Gets the entity type that this navigation property will hold an instance(s) of.
25
25
/// </summary>
26
- IEntityType INavigationBase . TargetEntityType
26
+ new IEntityType TargetEntityType
27
27
{
28
28
[ DebuggerStepThrough ]
29
29
get => IsOnDependent ? ForeignKey . PrincipalEntityType : ForeignKey . DeclaringEntityType ;
@@ -39,12 +39,12 @@ IEntityType INavigationBase.TargetEntityType
39
39
}
40
40
41
41
/// <summary>
42
- /// Gets the inverse navigation.
42
+ /// Gets a value indicating whether the navigation property is a collection property .
43
43
/// </summary>
44
- INavigationBase INavigationBase . Inverse
44
+ new bool IsCollection
45
45
{
46
46
[ DebuggerStepThrough ]
47
- get => Inverse ;
47
+ get => ! IsOnDependent && ! ForeignKey . IsUnique ;
48
48
}
49
49
50
50
/// <summary>
@@ -61,13 +61,49 @@ bool IsOnDependent
61
61
get => ForeignKey . DependentToPrincipal == this ;
62
62
}
63
63
64
+ /// <summary>
65
+ /// Gets the <see cref="IClrCollectionAccessor" /> for this navigation property, if it's a collection
66
+ /// navigation.
67
+ /// </summary>
68
+ /// <returns> The accessor. </returns>
69
+ [ DebuggerStepThrough ]
70
+ new IClrCollectionAccessor GetCollectionAccessor ( )
71
+ => ( ( Navigation ) this ) . CollectionAccessor ;
72
+
73
+ /// <summary>
74
+ /// Gets the entity type that this navigation property belongs to.
75
+ /// </summary>
76
+ IEntityType INavigationBase . DeclaringEntityType
77
+ {
78
+ [ DebuggerStepThrough ]
79
+ get => DeclaringEntityType ;
80
+ }
81
+
82
+ /// <summary>
83
+ /// Gets the entity type that this navigation property will hold an instance(s) of.
84
+ /// </summary>
85
+ IEntityType INavigationBase . TargetEntityType
86
+ {
87
+ [ DebuggerStepThrough ]
88
+ get => TargetEntityType ;
89
+ }
90
+
91
+ /// <summary>
92
+ /// Gets the inverse navigation.
93
+ /// </summary>
94
+ INavigationBase INavigationBase . Inverse
95
+ {
96
+ [ DebuggerStepThrough ]
97
+ get => Inverse ;
98
+ }
99
+
64
100
/// <summary>
65
101
/// Gets a value indicating whether the navigation property is a collection property.
66
102
/// </summary>
67
103
bool INavigationBase . IsCollection
68
104
{
69
105
[ DebuggerStepThrough ]
70
- get => ! IsOnDependent && ! ForeignKey . IsUnique ;
106
+ get => IsCollection ;
71
107
}
72
108
73
109
/// <summary>
@@ -77,6 +113,6 @@ bool INavigationBase.IsCollection
77
113
/// <returns> The accessor. </returns>
78
114
[ DebuggerStepThrough ]
79
115
IClrCollectionAccessor INavigationBase . GetCollectionAccessor ( )
80
- => ( ( Navigation ) this ) . CollectionAccessor ;
116
+ => GetCollectionAccessor ( ) ;
81
117
}
82
118
}
0 commit comments