この記事のように、データベース テーブルとデータ (ユーザー、ロール内のユーザーなど) の初期化をConfiguration.csに移動したいと思います。and-roles-with-mvc4-simplemembershipprovider-simpleroleprovider-ef5-codefirst-and-custom-user-properties/
しかし、私は質問があります: ユーザーを追加するための UserId を設定することは可能ですか? つまり、5 人のユーザーを追加でき、私が思うに、1-2-3-4-5 の ID を取得する必要がありますが、それを制御して ID マニュアルを設定できますか?
初期化は次のようになります。
if (!WebSecurity.UserExists("elena"))
WebSecurity.CreateUserAndAccount("elena", "password");