I am creating a Asp.Net site which will accept users’ registration/logon. The Asp.Net MVC automatically generate the following tables in a database with a strange name of aspnet-MyProjectName-20120705215524.
Is it possible to let Asp.Net Mvc generate the tables in my own database? (I have other tables which will refer the Users table). I will need the more columns in the table Users. Can I just manually add the columns to it? And I also want the extra columns show in the registration page.
Update
What’s the best practice of integrating the system generated Users tables?
- Memberships
- Profiles
- Roles
- Users
- UsersInRoles
CREATE TABLE [dbo].[Users] (
[ApplicationId] UNIQUEIDENTIFIER NOT NULL,
[UserId] UNIQUEIDENTIFIER NOT NULL,
[UserName] NVARCHAR (50) NOT NULL,
[IsAnonymous] BIT NOT NULL,
[LastActivityDate] DATETIME NOT NULL,
PRIMARY KEY CLUSTERED ([UserId] ASC),
CONSTRAINT [UserApplication] FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[Applications] ([ApplicationId])
);
Try the aspnet_regsql.exe tool this will generate the application services database for you
http://msdn.microsoft.com/en-us/library/ms229862(v=vs.80).aspx
You could add columns to the default database but I’m not on the effects of that, most of the app services use stored procedures so you could extend them