-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Hello. I have a list of 8.9kk objects which are loaded from sql database. I need to split this list into parts with some checks, conditions, shuffling and removals. Here is the first part:
List<DbEntry> list = all.Where(e => e.city == "Liverpool").Take(150000).ToList();
RemoveP(list);
List<DbEntry> list2 = all.Where(e => e.city == "London").Take(150000).ToList();
RemoveL(list2);
list.AddRange(list2);
list.Shuffle();
I need to take 2x 150k from all (8,9kk), then remove them from all-list. My methods RemoveP() and RemoveL() are "optimised" with exact city and citys row position(ids) in db - very specific. (for loops with predefined hardcoded limits, that set object=null then RemoveAll(x=>x==null); ). They are not very interesting, I could have archived this methods are done in ~10 mins each.
Then I've met your lib which looks promising.
I'm trying to follow your "simply to add "A" in front". And it's not working, saying that ToList() is not returning AList. Casting is not working too (AList)list.ToList();
How is this working?