我正在使用 .Net Core Identity 5,我在注册帐户时确实为用户添加了角色。我希望当我编辑该帐户的用户信息时,我可以更改他们在系统中的角色。 我在 Repo 工作,我怎样才能最有效地使用它?
视图模型
public class UserRoleViewModel
{
public string UserId { get; set; }
public string FullName { get; set; }
public string Email { get; set; }
public string Role { get; set; }
}