how to use theninclude inside generic repository ?
Loading
how to use theninclude inside generic repository ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Muhammad Imran AnsariPosted Jan 25, 2025, 6:57 PM
Hi Mohamed,
Using
ThenIncludein a generic repository pattern with Entity Framework requires ensuring the repository is designed to support flexible chaining ofIncludeandThenInclude. Here's a step-by-step guide to help you effectively useThenIncludein LINQ queries.https://learn.microsoft.com/en-us/aspnet/core/data/ef-mvc/read-related-data?view=aspnetcore-9.0
Thank you.
Amira BedhiafiPosted Jan 25, 2025, 6:50 PM
Some links to help you :D
Ef core Generic repository Include and ThenInclude : r/csharp
Generic Repository with EF Core in .NET Core 8 | by Jaimin Shethiya | Medium
https://learn.microsoft.com/en-us/answers/questions/1315166/parameterizing-theninclude%28%29-in-entity-framework