Call async method synchronously with await

前端 未结 0 605
情歌与酒
情歌与酒 2021-01-14 05:02

I\'m calling an async method (LoginAsync) for Authorization.

 UserObject = clienAuthenticationService.LoginAsync(sUser).Result;
 if (UserObject != null)
 {
           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题