/// <summary>
 /// Deprecated Method for adding a new object to the aspnet_ResetPasswordTokens EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToaspnet_ResetPasswordTokens(aspnet_ResetPasswordTokens aspnet_ResetPasswordTokens)
 {
     base.AddObject("aspnet_ResetPasswordTokens", aspnet_ResetPasswordTokens);
 }
        /// <summary>
        /// Create a reset password token for the user in order to allow him to change his password if he lost it.
        /// </summary>
        /// <param name="userId">
        /// The user id
        /// </param>
        /// <returns>
        /// The token created.
        /// </returns>
        /// <remarks>
        /// </remarks>
        public override Guid CreateResetPasswordToken(Guid userId)
        {
            var newTokenId = Guid.NewGuid();
            using (var entities = new AppleseedMembershipEntities(ConfigurationManager.ConnectionStrings["AppleseedMembershipEntities"].ConnectionString))
            {
                var newToken = new aspnet_ResetPasswordTokens
                    {
                       TokenId = newTokenId, UserId = userId, CreationDate = DateTime.UtcNow
                    };
                entities.aspnet_ResetPasswordTokens.AddObject(newToken);
                entities.SaveChanges();
            }

            return newTokenId;
        }
 /// <summary>
 /// Create a new aspnet_ResetPasswordTokens object.
 /// </summary>
 /// <param name="tokenId">Initial value of the TokenId property.</param>
 /// <param name="userId">Initial value of the UserId property.</param>
 /// <param name="creationDate">Initial value of the CreationDate property.</param>
 public static aspnet_ResetPasswordTokens Createaspnet_ResetPasswordTokens(global::System.Guid tokenId, global::System.Guid userId, global::System.DateTime creationDate)
 {
     aspnet_ResetPasswordTokens aspnet_ResetPasswordTokens = new aspnet_ResetPasswordTokens();
     aspnet_ResetPasswordTokens.TokenId = tokenId;
     aspnet_ResetPasswordTokens.UserId = userId;
     aspnet_ResetPasswordTokens.CreationDate = creationDate;
     return aspnet_ResetPasswordTokens;
 }