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 getDeviceDescription(int manufacture, string serialNumber)

{

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!