I have the following:-
- Visual Studio 2013.
- i created a new asp.net MVC-5 web project.
- the project is using asp.net identity 2.2.
- for the authentication method i chose "Individual user accounts"
- this process created a new database named
aspnet-OurProjectNanme-number - inside the automatically generated database, i have a table named
AspNetUSerswhich store the user info.
now i am working on building an ERP system. and inside the ERP system i want to add the following:-
- a table named "Asset" to store the asset info.
- the "Asset" table will have 2 columns named "
CreatedBy" + "ModifiedBy" which should store the userId who created and modified the asset item.
now i am not sure how i need to achieve this? as i need to add a foreign key between my custom table "Asset" and the "AspNetUsers" table which have been created automatically.. so can i add my custom table "Asset" inside the automatically generated database, and build the foreign key between the Asset.CreatedBy and AspNetUsers.Id ??
if the answer is Yes then can this relation break in the future if we want to upgrade our aspnet identity version ? as upgrading the identity might result in creating new tables or renaming existing ones etc.. which might break the relation between the Asset table and the AspNetUsers table?
If the answer is No (i should not add custom tables inside the automatically generated database ) then how i can build the foreign key ?? and where i need to add the Asset table in this case??