-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query: Include and ThenInclude should support collection navigation properties that are just IEnumerable<T> #1481
Comments
@ajcvickers @rowanmiller @anpete note that this is currently pri1 for RTM but I wonder if it is just a matter of adding some tests and changing the signature of this overload of public static IIncludableQueryable<TEntity, TProperty>
ThenInclude<TEntity, TPreviousProperty, TProperty>(
[NotNull] this IIncludableQueryable<TEntity, ICollection<TPreviousProperty>> source,
[NotNull] Expression<Func<TPreviousProperty, TProperty>> navigationPropertyPath) To public static IIncludableQueryable<TEntity, TProperty>
ThenInclude<TEntity, TPreviousProperty, TProperty>(
[NotNull] this IIncludableQueryable<TEntity, IEnumerable<TPreviousProperty>> source,
[NotNull] Expression<Func<TPreviousProperty, TProperty>> navigationPropertyPath) |
@divega Based on the current state of I modified the overload of ThenInclude in a local build and verified the existing tests pass via the official build script (although Azure tests skipped in my environment). I also ran through several Although a small change, this would be a nice addition to help keep entities from having to expose a public |
Talked to @divega @rowanmiller and decided to take this post RTM, probably in first point release. We should also make navigations exposed as IEnumerables but backed by ICollections work at that time--they currently don't work. |
We learned yesterday while discussing #1463 with @anpete and @ajcvickers that the EF7 runtime does not constrain collection navigation properties to be of types that can be assigned to
ICollection<T>
but thatIEnumerable<T>
is generally sufficient.The eager loading API should relax to support the same navigation property types.
The text was updated successfully, but these errors were encountered: