Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

enable async / parallel calls to aspnet core web api

$
0
0

hi, 

Ihow to do i enable aspnet core web api to be async and parallel ? 

i've methods in controller which are marked async and task but it does not enable parallel calls from javascript , 

should i have to make changes in startup .cs to enable aprallel calls to controller ?

or make it async 

here is a sample ofmy controller 

<div class="line number2 index1 alt1"></div> <div class="line number2 index1 alt1"></div> <div class="line number2 index1 alt1">


[httppost]
public async Task<IActionResult> City(string city)
{
using (var client = new HttpClient())
{

}
return data
}

[httppost]
public async Task<IActionResult> welcome(string city)
{
using (var client = new HttpClient())
{
}
reutrn data
}

</div> <div class="line number5 index4 alt2">i've sismiarly another method as the same </div> <div class="line number5 index4 alt2"></div> <div class="line number5 index4 alt2"></div>

Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>