You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I went through a guide describing how to configure navigation properties for the identity package and encounter a problem with relations between defined navigation properties, causing problem with eg. assinging role to user.
Steps to reproduce:
Configure database context with the navigation properties eg. UserRoleslink to source.
Add application user using UserManager<ApplicationUser> with method CreateAsync.
Add role using RoleManager<ApplicationRole> with method CreateAsync.
Confirm that user and role are added to database.
Assign role to the user using UserManager<ApplicationUser> with method AddToRoleAsync.
Observe that there is new entry in UserRole table which is correct, but with incorrect UserId and RoleId, which does not exist and was generated with running previous step.
Users:
UserRoles:
Roles:
I checked assigning role to user directly using ApplicationDbContext, which was successful and no ghost entries were added to Users and Roles tables:
I went through a guide describing how to configure navigation properties for the identity package and encounter a problem with relations between defined navigation properties, causing problem with eg. assinging role to user.
Steps to reproduce:
UserRoles
link to source.UserManager<ApplicationUser>
with methodCreateAsync
.RoleManager<ApplicationRole>
with methodCreateAsync
.UserManager<ApplicationUser>
with methodAddToRoleAsync
.UserRole
table which is correct, but with incorrectUserId
andRoleId
, which does not exist and was generated with running previous step.Users:
UserRoles:
Roles:
I checked assigning role to user directly using
ApplicationDbContext
, which was successful and no ghost entries were added toUsers
andRoles
tables:The same situation happens when using other navigation properties like
IdentityClaims
and etc.Issue reproduced with:
The text was updated successfully, but these errors were encountered: