title: Get nextvalue of sequence in postgresql
body: <p>I would like to get nextvalue of sequence in postgresql in my controller.</p>
  
  <p>I wrote a Custom Query, but I need to set it as Id (which is integer type). </p>
  
  <p>How can I do that or I should write custom insert query too?</p>
  
  <pre><code>int count = session.CreateSQLQuery("SELECT nextval('transport_id_seq')");
  </code></pre>