I have a method by QueryOver in Nhibernate3.1
var q = SessionInstance.QueryOver<Person>().
Where(person=>person.PersonIdentity.FirstName.IsLike(firstName,MatchMode.Anywhere));
return q.List<Person>();
Now i have a runtime error by this message:
Could not resolve property: PersonIdentity.FirstName of: MyNameSpace.Domain.Entities.Person
Why?
my problem resolved by add JoinQueryOver in Query
var q = SessionInstance.QueryOver<Person>().JoinQueryOver(p => p.PersonIdentity).Where(k => k.FirstName.IsLike(firstName, MatchMode.Anywhere));
By help of this link :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With