1

This is my first attempt, trying to integrate Membership on an existing shop already in production.

I'm not quite sure, based on my scenario, if I should use the build-in aspnet-providers or custom implementations of them in order to integrate membership.

Here's a few details:

  1. I have a multi-tenant, single database, single schema web app based on subdomain.
  2. The app is already in production and I will later want to link newly registered users with existing anonymous orders by email.

  3. The development will continue after the membership integration, new features will be added, meaning new columns and linked tables for the users table.

This answer got my thinking of using the membership deafult Profile in order to extend the users table created by the aspnet providers, since I don't have users yet. Though its not clear to me how I would link Users with Orders and other tables/entities that might later be added when the app is going to be extended.

Maybe I could define my entities related to users as user-defined profile properties but they would not have associations on my database.

Another overhead I'm thinking of is how would I associate the users with the different tenants of the app. I would want users to be able to regiter in different tenants/subdomains with the same email.

How would you implement membership in this scenario?

Community
  • 1
  • 1
Pantelis
  • 2,060
  • 3
  • 25
  • 40

1 Answers1

-1

This question is an aggregate of a few questions. I will try to answer them to he best of my knowledge

  • In case of managing users, i would like to suggest that you consider the following approach
  • Pre-define a list of basic user profile metadata that you will need in the application
  • Create an extensible approach like having custom fields for the user profile so that it can accommodate any data that may be required to capture in future
  • You should also be planning for a self-registration system in the application that will allow your user's to register themselves like the anonymuous ones that use the system with an email

Regarding associating the business entities, you will require to associate the entities with the tenant and not with the user. the level of application will be from the tenant and then it will flow down to the users.

Additionally, you should not have the user accessible business entities, when they are maintained in a form of package or so, it will be very easy to manage and use.

Share your thoughts on these approaches. - Create a tenant identifier column [property] for each profile that identifies the base tenant to which the user belongs to - create a table that manages the list of other tenant's that the user may be gaining access to at a later part

Saravanan
  • 7,637
  • 5
  • 41
  • 72