本文整理汇总了C#中IDbConnection.MultiQuery方法的典型用法代码示例。如果您正苦于以下问题:C# IDbConnection.MultiQuery方法的具体用法?C# IDbConnection.MultiQuery怎么用?C# IDbConnection.MultiQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDbConnection
的用法示例。
在下文中一共展示了IDbConnection.MultiQuery方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetOrgGroup
internal List<OrgGroup> GetOrgGroup(IDbConnection conn, IWhere where = null)
{
string tableName = "OrgGroup";
string fields = "PK_Group,InnerCode,Name,NC_PK_Group,NC_Modifiedtime";
if (where != null)
{
List<OrgGroup> t = conn.MultiQuery<List<OrgGroup>>(tableName)
.Fields(fields)
.Where(where)
.Execute();
return t;
}
else
{
List<OrgGroup> t = conn.MultiQuery<List<OrgGroup>>(tableName)
.Fields(fields)
.Execute();
return t;
}
}
示例2: GetDepartment
internal List<Department> GetDepartment(IDbConnection conn, IWhere where = null)
{
string tableName = "Department";
string fields = "PK_Dept,InnerCode,Name,PK_FDept,PK_Org,PK_Group,NC_PK_Dept,NC_Modifiedtime";
if (where != null)
{
List<Department> t = conn.MultiQuery<List<Department>>(tableName)
.Fields(fields)
.Where(where)
.Execute();
return t;
}
else
{
List<Department> t = conn.MultiQuery<List<Department>>(tableName)
.Fields(fields)
.Execute();
return t;
}
}
示例3: GetPersonCore
internal List<PersonCore> GetPersonCore(IDbConnection conn, IWhere where = null)
{
string tableName = "PersonCore";
string fields = "PK_User,Code,Name,ShortName,IDCardNumber,Sex,Age,Email,Mobile,Birthdate,JoinWorkDate,Censusaddr,NC_PK_User,NC_Modifiedtime";
if (where != null)
{
List<PersonCore> t = conn.MultiQuery<List<PersonCore>>(tableName)
.Fields(fields)
.Where(where)
.Execute();
return t;
}
else
{
List<PersonCore> t = conn.MultiQuery<List<PersonCore>>(tableName)
.Fields(fields)
.Execute();
return t;
}
}