-
Notifications
You must be signed in to change notification settings - Fork 56
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
Feat: IncludeInner extension method to force Parent/Children inner joins #584
Comments
Hello @tsanton , Thank you for reporting. With your text, I can definitely see the advantage of being able from time to time using the I will discuss it with my team this week to see if that's something we might want to implement next month or not. Best Regards, Jon |
Hello @tsanton , We started to take some time to think about this proposed feature. Is replacing ALL We believe the replacement of all join could be very easily done on our side, while the Let me know, Best Regards, Jon |
Oh @JonathanMagnan , why do you never ask easy questions? For now Before I answer (and sorry to try to pin you down) can you give estimates? I.e. if it's 2 weeks for the first (with minimal coding) and you can create a very concise api (i.e. as a final method Looking forward to hearing from you! /T |
My developer will start to check the first part this week It will be easier to give you a good estimate next Monday. Best Regards, Jon |
Hello @tsanton , A new version has been released. It's not fully completed, but if you use the latest version, you can add this 2 extension methods to your project: public static class Extensions
{
public static IQueryable<T> ReplaceAllLeftJoinByInnerJoin<T>(this IQueryable<T> query)
{
return Z.EntityFramework.Plus.PublicMethodForEFPlus.ReplaceAllLeftJoinByInnerJoin(query);
}
public static IQueryable<T> InterceptorCommandExecuting<T>(this IQueryable<T> query, Action<DbCommand> action)
{
return Z.EntityFramework.Plus.PublicMethodForEFPlus.InterceptorCommandExecuting(query, action);
}
} And use it to replace all context.Invoices.Include(x => x.Items).ReplaceAllLeftJoinByInnerJoin().ToList()` You can try it with the following online example A version of EF Plus should be available that already includes these 2 methods at the end of next month, but as I have shown, you can easily use it by adding those extensions to your project with the latest version. Best Regards, Jon |
This is an ask for an explicit inner join extension to force inner joins between parent and child/children entities in a FK relationship. This feature request is a shameless plagiarization of this (closed) issue from EF-core. Here is a summary of the issue and arguments for from the linked issue:
As of now I haven't found anything indicating that the EFcore-team will do anything to implement this feature for EF9. Further they seem very set on not explicitly declaring expected behaviour, but rather having it inferred from configuration. That to me means that I should not be holding my breath for this kind of "performance optimisation easily gained from data model understanding" features from the EFcore-team.
This feature request might be more natural implemented in the EF Plus codebase as I see that's where all the
IncludeX
extension methods are located, but to be fair this is an optimisation that I:I am therefore hoping this is an implementation/override of the query pipeline that you guys can easily implement, as it will massively benefit the community of "optimisation focused" query writer, and hopefully bring ZZZ Projects more customers :)
The text was updated successfully, but these errors were encountered: