Question
private async Task getDeviceDescription(int manufacture, string serialNumber) { var output = new sqlParameter(@deviceDescription, sqlDbType.NVarChar, 255) { Direction = ParameterDirection. Output }; await Database.ExecuteSqlCommandAsync(exec storedProcedure @manufacture,
private async Task
{
var output = new sqlParameter("@deviceDescription", sqlDbType.NVarChar, 255) { Direction = ParameterDirection. Output };
await Database.ExecuteSqlCommandAsync("exec storedProcedure @manufacture, @serialNumber, @deviceDescription OUT", new sqlParameter("@manufacture", manufacture), new sqlParameter("@serialNumber", serialNumber), output);
description = (string) output.Value;
return description;
}
I keep getting System.NotSupportedException: A second operation started on this context before a pervious asynchronous operation completed. Use await to ensure that any asynchronous operations have completed. I have a list of devices (100-1000 devices) and I want to get there description. I dont know how to get rid of this error and I noticed not all the descriptions are being shown like it skips some of the devices
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started