title: nhibernate difficulty in save
body: <p>i have this the code and i have this problem</p>
  
  <ul>
  <li>i am trying to save a new user to my web site : the query is succeded but without insertion</li>
  <li>ie the table "User" and the table "UserAcl" still without any modification and it is clear that the query is executed 
  File User.cs:</li>
  </ul>
  
  <p>File Compte.cs</p>
  
  <pre><code>public bool SaveUser(string identification, string acc, string mot, string notify, string nom, string phone, string mail) {
                 try
                 {
                     if (identification == null || acc == null || nom == null || mail == null  || mot == null) return false;
                     ITransaction transaction = User.OpenSession().BeginTransaction();
                     User u = new User() { Account = acc, Identification = identification, ContactEmail = mail, ContactName = nom, ContactPhone = phone, NotifyEmail = notify, Password = mot };
                     User.OpenSession().SaveOrUpdate(u);
                     transaction.Commit();
                    ITransaction transaction2 = User.OpenSession().BeginTransaction();
                     Useracl ua = new Useracl { Account = acc, UserID = identification, AccessLevel = 1, AclID = (Useracl.GetUseracl().Count + 1).ToString() };
                     Useracl.OpenSession().SaveOrUpdate(ua);
                     transaction2.Commit();
                     return true;
                 }
                 catch { return false; }
  
             }
  </code></pre>
  
  <p>File Administration.cs</p>
  
  <pre><code>  public ActionResult Index()
         {
  
             ViewBag.Title = c.GetUserID().Count.ToString();
              return View();
          }
          public ActionResult BeforeRegister()
          {
  
  
              return View();
          }
          public ActionResult AfterRegister(string Pseudo, string Phone, string Email, string Password, string Notify)
          {
  
              bool a = c.SaveUser((c.GetPassword().Count + 1).ToString(), (c.GetPassword().Count + 1).ToString(), Password, Notify, Pseudo, Phone, Email);
              if (a)
              {
                  return RedirectToAction("Index", "Administration");
              }
              else
  
                  return RedirectToAction("BeforeRegister", "Administration");
  
          }
  </code></pre>