title: how do I provide value for a parameter in an NHibernate Named Query
body: <p>I get the following error : "Message: No value given for one or more required parameters." when I try to test the code from MBUnit.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="myApplication.Core" namespace="studentTrak"&gt;
  
  
    &lt;class name="UniversityCourse" table="UniversityCourse" lazy="true"&gt;
  
      &lt;id name="Id" column="ID" type="int"&gt;
        &lt;generator class="native" /&gt;
      &lt;/id&gt;
  
      &lt;property name="Name" column="Name" type="string"  not-null="true"/&gt;
      &lt;property name="Description" column="Description" type="string" /&gt;
  
  
      &lt;many-to-one name="BestStudent" class="Student"/&gt;
      &lt;loader query-ref="GetBestStudent"/&gt;
  
    &lt;/class&gt;
    &lt;sql-query name="GetBestStudent" callable="true"&gt;
      &lt;return class="Student"&gt;
      &lt;/return&gt;
      SELECT *  FROM BestStudents WHERE CourseId = ?
    &lt;/sql-query&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>The code for the entity is:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace studentTrak
  {
      public class UniversityCourse 
      {
  
          public virtual int Id { get; set; }
          public virtual String Description { get; set; }
          public virtual String Name {get;set;}
  
  
          public virtual Student BestStudent
          {
              get;
              set;
          }
      }
  }
  </code></pre>
  
  <p>How do I provide the value that the named query needs?</p>