-2
Good morning,
I started working with c# and . Net recently on a micro service architecture. I noticed that all methods (controllers, services and repositories) use async/await. No criteria. According to what I read, it’s asynchronous programming, it makes sense to use it in controllers, for example ?
It makes sense to use async in an API controller ?
For example
[HttpPost("bulk/list/profiles")]
[ProducesResponseType(typeof(IEnumerable<Profiles>), 200)]
public async Task<IActionResult> GetBulkUsers([FromBody]string[] userIds)
{
var result = await _profileManager.GetBulkUsersProfile(userIds).ConfigureAwait(false);
return Ok(result);
}
Thank you.
https://answall.com/search?tab=votes&q=await%20async%20%5bc%23%5d
– Maniero
Thanks for the link, I changed the question to make my question clearer.
– alves