public async Task<T> AssignAsync<T>(string key, Func<T> acquire) {}
var result = await AssignAsync<T>(key, () => _repository.FindAsync(id));
报错:无法将 lambda 转制为预期委托类型
func 参数如何传入另一个 async 方法
试试如下操作:
var result = await AssignAsync<T>(key, async () => await _repository.FindAsync(id));