本文整理汇总了C#中ISession.CreateSqlQuery方法的典型用法代码示例。如果您正苦于以下问题:C# ISession.CreateSqlQuery方法的具体用法?C# ISession.CreateSqlQuery怎么用?C# ISession.CreateSqlQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISession
的用法示例。
在下文中一共展示了ISession.CreateSqlQuery方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetEducationBackground
private DataTable GetEducationBackground(ISession session, Resume resume)
{
string sql = "select * from education_background where resume_id=? order by edu_end_date desc";
ISqlQuery query = session.CreateSqlQuery(sql, resume.Id);
query.FirstResult = 0;
query.PageSize = 1;
return query.ExecuteGetDataTable();
}
示例2: GetPersonInfo
private DataTable GetPersonInfo(ISession session, Resume resume)
{
string sql = @"
select person_info.*,
case person_gender
when 1 then '男'
else '女'
end as person_sex,
area_name as living_place
from person_info join area_dict
on (person_info.person_living_area = area_dict.area_code)
where resume_id=?";
return session.CreateSqlQuery(sql, resume.Id).ExecuteGetDataTable();
}
示例3: GetWorkExperience
private DataTable GetWorkExperience(ISession session, Resume resume)
{
string sql = "select * from experience where resume_id=? order by exp_end_date desc";
return session.CreateSqlQuery(sql, resume.Id).ExecuteGetDataTable();
}
示例4: GetProfessionalSkill
private DataTable GetProfessionalSkill(ISession session, Resume resume)
{
string sql = "select * from professional_skill where resume_id=? order by skill_order";
return session.CreateSqlQuery(sql, resume.Id).ExecuteGetDataTable();
}
示例5: GetAward
private DataTable GetAward(ISession session, Resume resume)
{
string sql = "select * from award where resume_id=? order by award_order";
return session.CreateSqlQuery(sql, resume.Id).ExecuteGetDataTable();
}