public SimpleMembershipUser(UserDTO userDTO)
     : base(userDTO.ProviderName, userDTO.UserName, userDTO.ProviderUserKey, userDTO.Email,
     userDTO.PasswordQuestion, userDTO.Comment, userDTO.IsApproved, userDTO.IsLockedOut, userDTO.CreationDate, userDTO.LastLoginDate, userDTO.LastActivityDate,
         userDTO.LastPasswordChangedDate, userDTO.LastLockoutDate)
 {
     Password = userDTO.Password;
     Id = userDTO.Id;
 }
        public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
        {
            var newId = userDb.Values.Count() + 1;

            var userDTO = new UserDTO
            {
                Id = newId,
                ProviderName = "SimpleMembershipProvider",
                UserName = username,
                Password = password,
                ProviderUserKey = providerUserKey,
                Email = email,
                PasswordQuestion = passwordQuestion,
                Comment = string.Empty,
                IsApproved = isApproved,
                IsLockedOut = false,
                LastActivityDate = DateTime.Now,
                LastLockoutDate = DateTime.MinValue,
                LastLoginDate = DateTime.Now,
                LastPasswordChangedDate = DateTime.MinValue
            };

            var newUser = new SimpleMembershipUser(userDTO);

            status = MembershipCreateStatus.Success;

            userDb.Add(username, newUser);

            SaveChanges();

            return newUser;
        }