- 9c28c6d9-9f56-4bb6-88f9-57312b50107d
Greetin
I usetd to Ceate user Wizard to as one step when create user profile,when admin click on continou will move to next step creat staff details which will store is staff table as a sub of parent table (Users)
picture 1:(parernt Table users)
In sub-table (Staff) I used (UserId) as forigen key see picture 2
In front-end code (SQLDATASource), I'll remodify a code in insert mode;
Question here: What a principle type to store uniqueidentifier string or integer
- <InsertParameters>
- <asp:Parameter Name="UserId" Type="String" />
- </InsertParameters>
If I show USers table info (UserId) I see this value
- 9c28c6d9-9f56-4bb6-88f9-57312b50107d
it not integer jut a Nvarchar(Max)
I serached before post my question to catch a USERID to implemeint this value in detailsview load event; see that code:
- using Microsoft.AspNet.Identity;
-
- int userId = User.Identity.GetUserId<int>();
So what I do? to determine a true value, why them decleared it as integer; am lost
I can remix two table in one table if that easy, (move staff columns table to Users table), but I need them sperate.
Any suggestion?
Thanks