This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
When the user removes items from a table, then queries the table in OnEnlisted, The Count() will include the deleted records, but iterating the results of the query will not have the deleted records included. In the case below, itemCaseFiles.Count() equals 2, but when iterating itemCaseFiles, there are no items in the collection. We are currently using itemCaseFiles.ToList().Count() as a workaround since it gives the result.
|
|
|
Sorry Im a bit confused on the problem here. itemCaseFiles.ToList() is equivalent to enumerating the collection in terms of forcing materialisation, so similarly itemCaseFiles.Count() is equivalent to itemCaseFiles.ToList().Count(). Am I understanding you correctly in that you are saying itemCaseFiles is yielding no items but itemCaseFiles.ToList() is? If so what are the queries you are seeing as being executed with each call? Is there a difference?
|
|