Hi guys,
i am doing a asp.net mvc with identity framework, i have used the individual user account template as my base, and added some functions of my own. this has setup the identity framework, and identity.entityframework for me. I have only added the roles functionality right now, and its working fine. i havent touched any other code.
my ApplicationDbContext is connected as "DefaultConnection" to my database, and i have 10 tables.
AspNetUsers, AspNetRoles, AspNetUserClaims, AspNetUserLogins, AspNetUserRoles - these are the basic table i created for Identityframework with appropriate column, ive added my own column in AspNetUsers.
comments, commentsReplies, disicpline [discplineId, disciplineName], UserCommentAccess [Id commentID], UserDiscipline [Id, discplineID]
the identity framework as automatically connected to the context and used its tables. now i want to use my own tables to show the user its data. so i imported the tables using ADO.NET EntityData Model. and i have imported all tables, as they all have relationship with each other. but, i can only see 7 of my tables.

this is the connection of my tables in db.
| Referencing Table | Referencing Column | Referenced Table | Referenced Column |
| UserDisciplines | disciplineID | discipline | disciplineID |
| AspNetUserRoles | RoleId | AspNetRoles | Id |
| AspNetUserRoles | UserId | AspNetUsers | Id |
| AspNetUserClaims | UserId | AspNetUsers | Id |
| AspNetUserLogins | UserId | AspNetUsers | Id |
| comments | Id | AspNetUsers | Id |
| commentsReplies | Id | AspNetUsers | Id |
| UserDisciplines | Id | AspNetUsers | Id |
| UserCommentAccess | Id | AspNetUsers | Id |
| commentsReplies | commentId | comments | commentID |
am i doing something wrong here. because, there is a relationship between, AspNetUsers > UserDiscipline > discipline.
UserDiscpline acts as a safety table for sql injections.
i want to be able to use, discpline table within the register.cshtml to make sure that users are able to pick discipline when registering, and i want admin to dynamically add/remove discpline. i cannot do this if the ado.net tables arent imported correctly.
can i get some help please, i am new to ASP.net and ADO.net
Safal S ShresthaPosted Nov 21, 2023, 1:54 PM
hi i did that but it didnt work,
but i realised after hrs of research that, when you use identity framework. it automatically imports using entity. and connects the ASPNET tables. so if i wanted to import other tables, i need to import them seperately, so i made cutom getter setter, and imported the tables.
Tuhin PaulPosted Nov 10, 2023, 3:09 PM
I think the Entity Data Model wizard not including all the tables when you imported your database schema. Sometimes, the Entity Data Model designer doesn't automatically update. Right-click on the designer surface, and select "Update Model from Database" to refresh the model. See if it helps.