private async Task<List<Author>> GetAuthors()
{
await Task.Delay(100).ConfigureAwait(false);
return authors;
}
[HttpGet]
public async Task<ActionResult<IEnumerable<Author>>> Get()
{
var data = await GetAuthors();
if (data == null)
return NotFound("No record");
return data;
}
文档更新时间: 2022-03-02 19:18 作者:admin