I just tried upgrading from EF Core 2 to EF Core 3. Every call I have is an Async Task<> method, but I'm still getting the A "Second operation started, see https://go.microsoft.com/fwlink/?linkid=2097913" error. I know it says to await every method, but doesn't that defeat the purpose of making async calls? Also, why does it work in EF Core 2 and not EF Core 3? If I have to use a diff db context, how can this be done with dependency injection in .net core 3?
// Async method that we will await later.
var softwareServiceCodeTask = _pricingCalcRepo.IsSoftwareServiceCodeAsync(jobsId)
pricingCalcInfo = await GetJobDetailsAsync(jobsId);
private async Task<PricingCalculationInfo> GetJobDetailsAsync(int jobsId)
{
return await (
from jobs in _contextProposal.PRP_Jobs
join service in _contextProposal.PRP_Service on jobs.ServiceId equals service.ServiceId
join proposal in _contextProposal.PRP_Proposal on service.ProposalId equals proposal.ProposalId
where jobs.JobsId == jobsId
select new PricingCalculationInfo
{
ContractYear = proposal.ContractYear,
BidCrewSize = jobs.BidCrewSize,
ServiceCode = service.ServiceCode,
Territory = jobs.Territory,
TotalPONIs = jobs.TotalPONIs,
WeekWorkHours = _appSettings.Value.WeekWorkHours,
NonProductiveHoursPerWeek = _appSettings.Value.NonProductiveHoursPerWeek
}).FirstAsync();
}