Answer the question
In order to leave comments, you need to log in
How not to wait for await in asp net core?
Let's say there is a method
public async Task<ActionResult> Like(int postId)
{
//получаем id юзера из клеймов
await _likeFacade.LikeAsync(UserId,postId, nameOf(News));
return NoContent();
}
Answer the question
In order to leave comments, you need to log in
In the background, without await, I can’t write a like to the database, when return NoContent() everything is disposed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question