【发布时间】:2015-08-11 08:47:33
【问题描述】:
等待同步 repo.GetCategories 调用对端点的可用性有什么好处?
我的第一个想法是这毫无意义。但我不确定。
[HttpGet]
public async Task<IHttpActionResult> Get(string country)
{
var result = repo.GetCategories(new List<string> { country});
return await Task.FromResult(Ok(result));
}
【问题讨论】:
标签: c# asp.net-web-api async-await asp.net-web-api2