public async Task SetRole(int userId = 1, string roleName = "User")
        {
            //await _userManager.AddToRoleAsync(1, "Admin");\
            var context = new NewsEngineContext();
            var rol     = new UserRole
            {
                UserId = 1,
                RoleId = 4
            };

            context.UserRoles.Add(rol);
            context.SaveChanges();
        }
示例#2
0
 public AppUserStore(NewsEngineContext context) : base(context)
 {
 }