UserStore bug
Opened this issue · 0 comments
gtaylor44 commented
This doesn't look right:
UserStore.cs
if (!roleId.HasValue)
roleId = await connection.ExecuteAsync($"INSERT INTO [ApplicationRole]([Name], [NormalizedName]) VALUES(@{nameof(roleName)}, @{nameof(normalizedName)})",
new { roleName, normalizedName });
This will return the number of affected records.
You should use an output param with the newly inserted id instead.