Hi Aeden,
The syntax for Expression.Sql is not a class ... it's a factory method that creates an ICriterion for you (making the interface more fluent).
There are two ways you can create the criteria you are talking about. Either using aliases:
Code:
Return
Session
.CreateCriteria(GetType(Order))
.CreateAlias("Customer", "cust")
.Add(Expression.Like("cust.LastName", "Doe%"))
.List<Of Order>()
Or using a second ICriteria:
Code:
Return
Session
.CreateCriteria(GetType(Order))
.CreateCriteria("Customer")
.Add(Expression.Like("LastName", "Doe%"))
.List<Of Order>()
Regards,
Richard