Open techcomputerworld opened 5 years ago
var result = await objeto._userManager.AddToRoleAsync(identityUser, Input.Role); Esa linea me da este error y claro no me deja seguir, por lo que veo tendre que borrar el rol y volverlo a crear o actualizarlo de alguna manera ¿cómo se hace en identity? That line gives me this error and of course does not let me follow, so I see I will have to delete the role and re-create or update it somehow how do you do in identity? The instance of entity type 'ApplicationUser' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the conflicting key values."} System.Exception {System.InvalidOperationException}
Seleccionas un rol en el dropDownList el que sea y no lo cambia en la base de datos que es donde deberia cambiarlo You select a role in the dropDownList whatever it is and it doesn't change it in the database that is where you should change it https://github.com/techcomputerworld/domotica-db/tree/master/Domotica-db/Areas/Usuarios/Pages/Editar