Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Created Unassigned: Insert statements do not specify columns [1002]

$
0
0
I've been working on bringing the WebSecurity membership tables into Entity Framework, but I run into an issue when my DB is autogenerated by EF while inserting roles. The reason is that EF builds the roles table with the columns reversed (Role ID/User ID vs User ID/Role ID).

Looking through the source of aspnetwebstack, I noticed an INSERT statement in AddUsersToRoles in SimpleRoleProvider:

int rows = db.Execute("INSERT INTO " + UsersInRoleTableName + " VALUES (" + userIds[uId] + "," + roleIds[rId] + "); ");

The column names are not specified explicitly, so if the column order is different than expected, this statement will fail. I would like to see someone patch this and review other INSERT statements for a similar issue.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>