c# - Identity creates additional foreign key without relationship -


i've implemented identity 2.0 in app unable logins , claims tie in application user class. i'm using following generate tables (and keys):

        modelbuilder.entity<applicationuser>().totable("user");         modelbuilder.entity<applicationuser>().property(p => p.id).hascolumnname("userid");          modelbuilder.entity<identityuserlogin>().totable("userlogin");         modelbuilder.entity<identityuserlogin>().haskey<string>(l => l.userid);          modelbuilder.entity<identityuserclaim>().totable("userclaim");         modelbuilder.entity<identityuserclaim>().haskey<int>(l => l.id);          modelbuilder.entity<identityrole>().totable("role");         modelbuilder.entity<identityrole>().haskey<string>(r => r.id);          modelbuilder.entity<identityuserrole>().totable("userrole");         modelbuilder.entity<identityuserrole>().haskey(r => new { r.roleid, r.userid }); 

each of tables creates additional column of applicationuser_id in addition userid column there, when storing new claims via:

    await usermanager.addclaimasync(user.id, tokenclaim); 

the userid field filled correct user id applicationuser_id remains blank, when retrieve user there no claims or logins associated it. how can correct this?


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -