📜  joinAlias nHibernate - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:16.581000             🧑  作者: Mango

代码示例1
Customer customerAlias = null;
Organization organizationAlias = null;

IList customers = session.QueryOver(() => customerAlias)
    .Left.JoinAlias(x => x.Organization, () => organizationAlias)
    .Where(customer => customer.Name == "Customer Name")
    .And(() => customerAlias.Age > 18)
    .AndNot(() => organizationAlias.Name == "Forbidden Organization")
    .List();