Add MoreLinq NuGet package.
Reduce the amount of database queries