c# - NHIbernate OR Criteria Query -


I have the following mapped classes

  business {id, account, account, Account} Account {ID, Company} Company {ID}  

Now I can not select all the trades in a way where

  AccountFrom.Company ID = X or accountTo I). Add (ACs ("id", x); criteria (creativity) ("account"). CreateCriteria ("Company"). Add (restriction. Eq ("id", x);   But how can I change it or any other one? I have used a combination before, but I do not know how to add different criteria, just restriction. 

  Return Session. Credit Credits "Trade" (.) CreteAlways ("AccountForm", "F."). T. Alias ​​("Account", "A"). (Restrictions (or restrictions. AC ("F. Companie CompanIID", Company ID), Ban .eek ("Companie CompanIID", Company ID)). Treadmill; & gt; ();  

I do not think you will need a nickname.


Comments