public void AddLogin(LoginEntity loginEntity, string password) { UserPassowrdEntity pwdEntity = new UserPassowrdEntity(); pwdEntity.UserId = loginEntity.UserId; pwdEntity.UserName = loginEntity.UserName; pwdEntity.IsCanLogin = loginEntity.IsCanLogin; pwdEntity.RegisterTime = DateTime.Now; pwdEntity.Password = EncryptTool.MD5(password); persistence.Add(pwdEntity); }