Wherecondition linq like

Dec 27, 2008 at 6:47 AM
 var w = v_BDC_Word.Find(CK.K["Name"].Like("% %").Not() && CK.K["PassVoice"]=="0");
is ok

 var w = v_BDC_Word.Find(p=>p.ccc.contains("xxxx") );
is not ok

how to write LIKE SQL use linq in where condition?
Coordinator
Dec 27, 2008 at 11:56 AM
It should work.

It tested in Lephone.UnitTest.Linq.CommonTest.Test3.

And I write the following test in Lephone.UnitTest.Linq.RealOperateTest.Test3 it works as well:

[Test]
public void Test3()
{
    var list = Person.Find(p => p.FirstName.Contains("T"));
    Assert.AreEqual(1, list.Count);
    Assert.AreEqual("Tom", list[0].FirstName);
}
Dec 28, 2008 at 3:22 AM
sorry, 

var w = v_BDC_Word.Find(p=> !p.ccc.contains("xxxx") );

is not work

! means not
Dec 28, 2008 at 3:23 AM
p=> p.vvv="0" && !p.ccc.contains("cc")

is not work
Coordinator
Dec 28, 2008 at 9:53 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Dec 28, 2008 at 10:08 AM
fixed.

thx.