how to use theninclude inside generic repository ?
ThenInclude Linq
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
how to use theninclude inside generic repository ?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amira BedhiafiRank #601 · 4K reputationPosted Jan 25, 2025, 1:50 PM EST
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
Muhammad Imran AnsariRank #326 · 7.6K reputationPosted Jan 25, 2025, 1:57 PM EST
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.