I have the following problem. While using the following code below to change the user\'s current role i am getting an exception with the message like below:
My roles are managed in the seed method of my DbMigrationsConfiguration class and I renamed it like this:
if (context.Roles.Any(r => r.Name == "User"))
{
var store = new RoleStore(context);
var manager = new RoleManager(store);
var role = manager.Roles.First(r => r.Name == "User");
role.Name = "NewNameForUser";
manager.Update(role);
}