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);
        }
        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;
        }