📅  最后修改于: 2022-03-11 15:00:16.581000             🧑  作者: Mango
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();