Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I change the webpages_ Membership table name prefix in ASP.NET MVC 4?

I'm creating an ASP.NET MVC 4 web site, and with the default project template it auto-generates some tables in my database for membership. For example:

  • webpages_Membership
  • webpages_Roles

etc.

Because I may be wanting to use a single database for more than one website, I would like to replace the "webpages_" prefix with something specific to this website, but I can't find where this is configured. How can I change this in an ASP.NET MVC 4?

like image 449
Mark Heath Avatar asked Jan 15 '23 08:01

Mark Heath


1 Answers

No, not really. The table names are hard coded in the SimpleMembershipProvider.

You could go get the source, modify the names, and use your own version if you wanted. The source is here:

http://aspnetwebstack.codeplex.com/SourceControl/changeset/view/e0115a823029#src%2fWebMatrix.WebData%2fSimpleMembershipProvider.cs

like image 138
Erik Funkenbusch Avatar answered Jan 30 '23 22:01

Erik Funkenbusch