编辑帐户用户和角色 .Net 核心身份

时间:2021-03-18 10:16:35

标签: asp.net-core repository asp.net-core-identity user-roles

我正在使用 .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; }
    }

0 个答案:

没有答案