c# - LINQ check string property for NULL in generating a ToList() -


I have this linen statement which successfully creates the list if the property is not fired

  Result. Adrenal (M_CTST.T.There (x => x.Property.Contains (Search)). ToList ()); However, if x.property is null, then it is errors, so I would like to try to check it for spaces and if it is not empty then proceed to making the list.  

I have tried,

  result.adrenent (m_CTS.Entity.Where (x => x.Property == zero? "": X.Property .Contains (Search) ToList ()).   

But also errors, what am I doing wrong?

In advance thanks

x.Property.Contains (search) / Code> a bool , so the other side of the turner operator should do this:

  x => X.Property == Tap? Incorrect: x. Property. Search (Search)   

Or simply:

  x = & gt; X Property! = Null & amp; amp; X.Property.Contains (Search)    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -