I migrating from EF core 2.2 to 3.1 and a query that used to work, now throws an exception . I know that there are breaking changes to this version but I need to find a proper workaround for my query, hope someone could help :)
The query:
return await dbContext.JobsBulkDbSet.Where(i => i.Uuid == uuid)
.GroupJoin(dbContext.JobDbSet.Include(x => x.UpgradeJobs),
bulk => bulk.Uuid,
job => job.JobsBulkEntityUuid,
(bulk, jobs) => SetJobs(bulk, jobs)).AsNoTracking().FirstOrDefaultAsync();
And the error I get is :
Processing of the LINQ expression 'DbSet<JobsBulkEntity>
.Where(i => i.Uuid == __uuid_0)
.GroupJoin(
outer: DbSet<JobEntity>
.Include(x => x.UpgradeJobs),
inner: bulk => bulk.Uuid,
outerKeySelector: job => job.JobsBulkEntityUuid,
innerKeySelector: (bulk, jobs) => EFJobsBulkRepository.SetJobs(
bulk: bulk,
jobs: jobs))' by 'NavigationExpandingExpressionVisitor' failed. This may indicate either a bug or a limitation in EF Core. See https://go.microsoft.com/fwlink/?linkid=2101433 for more detailed information.
Thanks