ISession session = NHibernateHelper.GetOcextSession();
DataSet ds = new DataSet();
string strSql = string.Format(" select * from student where id={0}",ID);
try
{
IDbCommand command = session.Connection.CreateCommand();
command.CommandText = strSql;
SqlDataAdapter da = new SqlDataAdapter(command as SqlCommand);
da.Fill(ds);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}