1

Closed

IsLocked always return true

description

with this code:

var opAd = new ADOperator("XXXX", "XXXX", "XXX");
var adQuery = UserObject.FindAll(opAd);
var resulttmp = (from u in adQuery where u.IsLocked = false select new userADInfo());

resulttmp is always empty. all items in adQuery ((995 in my case)) have isLocked=true
Closed Sep 5, 2016 at 9:00 AM by pangxiaoliang
Actually, your Linq syntax is not correct, please use the following sentence:
var resulttmp = (from u in adQuery where u.IsLocked == false select new userADInfo());

comments

brunchto wrote Sep 8, 2016 at 1:29 PM

c# beginner alert !!!
thanx for the correction :)

brunchto wrote Sep 8, 2016 at 1:37 PM

by the way, on debug mode, if i spy on adQuery before the resulttmp linq query, IsLocked is always true in adQuery items

pangxiaoliang wrote Sep 9, 2016 at 5:47 AM

I don't know what the "spy" do you mean, "quick watch"?
I will be false, please check. If you have any question please take a screenshot and send me an Email.(mv@live.cn) :)