Не могу получить доступ к экземпляру утилизированного контекста ... < /p>
< /blockquote>
при попытке выполнить два вызова в базу данных - один сразу после другой. Это Blazor Web App с использованием SQL Server.
Код в программе.
Код: Выделить всё
builder.Services.AddDbContext(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("Laptop")));
builder.Services.AddTransient();
Код: Выделить всё
CalibrationTypes = await EqRepo.GetAllEquipmentCalibrationTypes();
Calibrations = await EqRepo.GetAllCalibrationsForEquipment(Equipment.ID);
Код: Выделить всё
List equipmentCalibrationTypes = await context.EquipmentCalibrationTypes.ToListAsync();
return equipmentCalibrationTypes;
Код: Выделить всё
equipmentCalibrations = await context.EquipmentCalibrations.Where(ec => ec.Equipment.ID == equipmentID).ToListAsync();
return equipmentCalibrations;
Подробнее здесь: https://stackoverflow.com/questions/796 ... or-web-app