Skip to Content

Solved: How do I call async method in C#?

Question/Problem Description How to call GetMemberList() method in FOR EACH loop in C#? public async Task<IEnumerable<Domain.BARTER.Member>> GetMemberList() { using (var con = new SqlConnection(BridgeControllers.Database.BarterDBString)) { var storedProcedureName = “MemberList”; return await con.QueryAsync<Domain.BARTER.Member>(storedProcedureName, new { }, commandType: CommandType.StoredProcedure); } } Solution Calling this in a for loop will be the best. The method does not seem …

Read More about Solved: How do I call async method in C#?
Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

This site depends on revenue from ad impressions to survive. If you find this site valuable, please consider disabling your ad blocker.