I wonder if there is any chance to change name of foreign key constraint generated by Entity Framework when using code first.
I have two entities - User
and Group
- with many-to-many relationship so there is an association table GroupUser
. Unfortunately, auto-generated foreign key constraints are named FK_dbo.GroupUser_dbo.User_User_UserId
and FK_dbo.GroupUser_dbo.Group_Group_GroupId
.
I would like to have foreign key constraints called like FK_GroupUser_UserId
and FK_GroupUser_GroupId
. That looks much cleaner to me.