BUG: Role records not deleted when you delete a user

Jul 14, 2014 at 2:02 AM
The following test code runs successfully, but will leave orphan Role records in the AspNetUsers table:
            var user = new ApplicationUser() { UserName = Username };

            var manager = new ApplicationUserManager(new UserStore<ApplicationUser>());

            var create = await manager.CreateAsync(user, password);
            Assert.IsTrue(create.Succeeded, create.Errors.FirstOrDefault());

            var currentUser = manager.FindByName(user.UserName);

            var roleresult = manager.AddToRole(currentUser.Id, "Superusers");

            var delete = await manager.DeleteAsync(currentUser);
Jul 22, 2014 at 7:46 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Sep 29, 2014 at 4:43 PM
This issue has been resolved here
Marked as answer by dotnetdavy on 9/29/2014 at 8:43 AM