Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

Claim: 1 Answered: 1 week ago

Answered: 1 week ago

Question

What must a creditor do to become a secured party?

Answered: 1 week ago

Question

When should the last word in a title be capitalized?

Answered: 1 week ago