Skip to content

Instantly share code, notes, and snippets.

@srkirkland
Created October 21, 2010 20:34
Show Gist options
  • Save srkirkland/639293 to your computer and use it in GitHub Desktop.
Save srkirkland/639293 to your computer and use it in GitHub Desktop.
public IList<SearchStudent> SearchStudentByLogin(string login, string termCode)
{
var searchQuery = NHibernateSessionManager.Instance.GetSession().GetNamedQuery("SearchStudentByLogin");
searchQuery.SetString("login", login);
searchQuery.SetString("term", termCode);
return searchQuery.List<SearchStudent>();
}
<sql-query name="SearchStudentByLogin">
<return class="SearchStudent"></return>
EXEC usp_SearchStudentByLogin :login, :term
</sql-query>
----
Inside the mapping file, after the SearchStudent class declaration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment