public Task<TUser>
FindMainUserByIdAsync(string id){
var user =_context.Users.Where(x => x.Id.Equals(id)).SingleOrDefaultAsync();
return Task.Run(() => user);
}
答案 0 :(得分:0)
公共异步任务 FindMainUserByIdAsync(string id){ var user = await _context.Users.Where(x =&gt; x.Id.Equals(id))。SingleOrDefaultAsync(); 将用户返回为TUser; }