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.AggregateException: One or more errors occurred. ---> System.NotSupportedException: A second operation started on this context before a previous asynchronous operation completed. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context. Any instance members are not guaranteed to be thread safe.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
