Database Object Prefix Naming Scheme

Oct 18, 2011 at 2:31 PM

This membership provider may be of use with Azure and other configurations where it is necessary and convenient to minimize the number of databases and schema.  Azure charges per database and also makes it practical for several tenants to share a database, for example with one schema per tenant.  To support this, I propose that a prefix be added to the various database objects this provider requires.  This prefix would allow developers to easily distinguish which objects are used by the membership provider from those used by the application, preventing potential naming conflicts or erroneous changes to the provider's objects.

For example:

  • Users -> ZZZZZUsers
  • GetUserByUsername -> ZZZZZGetUserByUsername

Here are a few possible prefixes:

  • EFMembership
  • OmidID
  • Membership
  • ASPNETMembership
  • Member

Of these, I think the first two are ideal because they are specific to the provider.  This supports the presence of objects for multiple providers as might be required in a multiple-authentication scheme.

Oct 20, 2011 at 10:01 AM


You right. I planing to add this feature in next release. in the upcoming version i using ef4.1 code first.
This is a very important feature that you said and I'll b implementing this on the next release, for sure. this feature is will be fully custom able.

Thank you for your comment and Issue.

Dec 9, 2011 at 5:13 PM

I am not sure if the prefix is the solution for multiple applicqations (tenants) to share the same database.  It may be more practical to add a table to store mutiple applications or tenants.  So that the selection of AppId or TenantId can be dynamically selected.  It may be more extensible in the futre.  In any case, great work!

Dec 9, 2011 at 5:29 PM



That's a much better idea, as long as the admin can name the "master" table as desired and point to it with web.config.  Perhaps this design could accommodate "host headers" as well, allowing many tenants sharing one instance of an application (with varying URLs) to have separate membership data.


Jan 30, 2012 at 11:15 AM

Problem solved in new Version. thanks all