Linq To NHibernate: .StartsWith on multiple properties -
I'm trying to complete the following questions (notice. Stars):
In the Back (_session.Linq & lt; Profiles & gt; (), select from P. (Wildcard) from where (P. First Name + "+ + P. LETNAM)". P.O.List ();
Throws it: Property can not be solved: Firstname.Lostname.
If I do this:
Return (from _session.Linq & lt; profiles & gt; () where p.Firstname.StartsWith (wildcard) Select P) .Olist ();
Everything is working, how can it be?
Thanks in advance!
where
expression
does not know the strings How to control the combination of it is trying to understand the properties, not the values.
In addition to this, for future reference, start with the same, concert and the other will return the same thing in practice.
What is it that you want?
Return (_session.Linq & lt; Profiles & gt; ()) where p.firstname.StartsWith (wildcard) || P.Llastname.StartsWith (wildcard) select p) .Olist ();
Comments
Post a Comment