【发布时间】:2016-10-12 20:22:52
【问题描述】:
在以下方法中,我收到了警告:This async method lacks 'await' operators and will run synchronously。在这个方法中我可以在哪里使用await? 注意:此方法返回一个简单的静态视图,而不与数据库等交互。
public class TestViewComponent : ViewComponent
{
public async Task<IViewComponentResult> InvokeAsync()
{
return View();
}
}
【问题讨论】:
标签: c# asp.net-core asp.net-core-viewcomponent