-
-
Notifications
You must be signed in to change notification settings - Fork 365
Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
public class LookupServiceBaseEntity(ISysUserService sysUserService) : LookupServiceBase
{
private ISysUserService SysUserService { get; } = sysUserService;
public override IEnumerable<SelectedItem>? GetItemsByKey(string? key, object? data)
{
IEnumerable<SelectedItem>? items = null;
if (key == "Foo.Complete")
{
var users = SysUserService.GetAllUsersAsync().Result;
//var localizer = Provider.GetRequiredService<IStringLocalizer<Foo>>();//多语言支持
items = users.Select(user => new SelectedItem
{ Value = user.Id.ToString(), Text = user.Name }).ToList();
}
return items;
}
Describe the solution you'd like
可以 使用 .Result 异步方法获取值。
Additional context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
