Click here to Skip to main content
15,895,709 members
Articles / Web Development / XHTML

Custom membership provider for the ADO.NET Entity Framework

Rate me:
Please Sign up or sign in to vote.
4.27/5 (19 votes)
3 Jan 2013CPOL1 min read 159.2K   3.6K   74  
Custom membership provider implementation for the ADO.NET Entity Framework.
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[User](
	[Id] [uniqueidentifier] ROWGUIDCOL  NOT NULL CONSTRAINT [DF_User_Id]  DEFAULT (newid()),
	[Name] [nvarchar](50) COLLATE Latin1_General_CI_AS NULL,
	[CreationDate] [datetime] NULL,
	[Username] [nvarchar](50) COLLATE Latin1_General_CI_AS NOT NULL,
	[FirstName] [nvarchar](50) COLLATE Latin1_General_CI_AS NULL,
	[LastName] [nvarchar](50) COLLATE Latin1_General_CI_AS NULL,
	[ApplicationName] [nvarchar](100) COLLATE Latin1_General_CI_AS NULL,
	[Email] [nvarchar](100) COLLATE Latin1_General_CI_AS NOT NULL,
	[Password] [nvarchar](100) COLLATE Latin1_General_CI_AS NULL,
	[PasswordQuestion] [nvarchar](255) COLLATE Latin1_General_CI_AS NULL,
	[PasswordAnswer] [nvarchar](255) COLLATE Latin1_General_CI_AS NULL,
	[IsApproved] [bit] NOT NULL CONSTRAINT [DF_User_IsApproved]  DEFAULT ((1)),
	[LastActivityDate] [datetime] NULL,
	[LastLoginDate] [datetime] NULL,
	[LastPasswordChangedDate] [datetime] NULL,
	[IsOnline] [bit] NULL,
	[IsLockedOut] [bit] NULL,
	[LastLockedOutDate] [datetime] NULL,
	[FailedPasswordAttemptCount] [int] NULL,
	[FailedPasswordAttemptWindowStart] [datetime] NULL,
	[FailedPasswordAnswerAttemptCount] [int] NULL,
	[FailedPasswordAnswerAttemptWindowStart] [datetime] NULL,
	[LastModified] [datetime] NULL,
	[Comment] [nvarchar](255) COLLATE Latin1_General_CI_AS NULL,
 CONSTRAINT [PK_User] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Swissworx
Australia Australia
MCAD, MCPD Web Developer 2.0, MCPD Enterprise Developer 3.5

My company: Swissworx
My blog: Sitecore Experts

Hopp Schwiiz Smile | :)

Comments and Discussions