-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: IList.Count() at least 1, although list is empty
PostPosted: Fri Apr 23, 2010 2:38 am 
Newbie

Joined: Thu Apr 22, 2010 1:00 pm
Posts: 1
Hi,
I have got a strange issue with an IList. Select the data from a Linq<Entity>() query I am filling up an IList via ToList().
Storing the contents in IList<Entity> entity and doing a count on it entity.Count() results in 1 although the list is empty. Expanding the the list in VS shows me for entry[0] = null but below is an entry Raw View.

Does anyone know what is happening here?

The code looks like this:
Code:
return UnitOfWork.CurrentSession.Linq<User>().ToList();


Thanks a lot!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.