For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > November 2006 > MembershipUser









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author MembershipUser
mehdi

2006-11-29, 8:04 am

Hi folks,
Consider a database (for a given business) that has got many tables,
one of which is EmployeeAccount where the employee's information is
stored. The table is also related to some other tables in the database.
Each employee has got one and only one user name assigned.

The Username/Password pair is on the other hand stored in the aspnetdb
database, using the Membership APIs.

There has to be a good way to relate EmployeeAccount table to a
specific username in the Membership db, so that whenever desired, I can
reach to an EmployeeAccount record based on a given username (or vice
versa).

How am I supposed to handle this? Shall I store the EmployeeAccountId
in the user profile??? What's the best approach?

Any help would be highly appreciated,

Cheers,
Mehdi

cada0310

2006-11-30, 7:04 pm

I have a similar question (or perhaps it's exactly the same)...I need to
point other tables to the ASP.NET User table with foreign keys. What's the
best thing to point to? The UserId (which appears to be a UUID) seems to be
the right thing to me, but I can't seem to figure out the call to get at it
inside my application. There doesn't seem to be a
Membership.GetUser().UserId call I can make to reference it.

This leads me to believe I should be pointing to the UserName with other
tables?

If anyone has any hints, please let me know.

Thanks.


"mehdi" wrote:

> Hi folks,
> Consider a database (for a given business) that has got many tables,
> one of which is EmployeeAccount where the employee's information is
> stored. The table is also related to some other tables in the database.
> Each employee has got one and only one user name assigned.
>
> The Username/Password pair is on the other hand stored in the aspnetdb
> database, using the Membership APIs.
>
> There has to be a good way to relate EmployeeAccount table to a
> specific username in the Membership db, so that whenever desired, I can
> reach to an EmployeeAccount record based on a given username (or vice
> versa).
>
> How am I supposed to handle this? Shall I store the EmployeeAccountId
> in the user profile??? What's the best approach?
>
> Any help would be highly appreciated,
>
> Cheers,
> Mehdi
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com