Skip to main content
2 of 7
added 52 characters in body
paparazzo
  • 6k
  • 3
  • 19
  • 41

Pretty minor but you don't need the if (row_id == 0)

if (row_id++ > list_size) // Add the sublist to the result
{
    result.Add(route_list); 
    row_id = 0;
    route_list = new List<long>();
}

Also it seem like you should also test for

if (route_list.Count > 0 ) 

Connection, Command, and Reader behave the same with many DB so this is pretty portable.

I think you can use

conn.CreateCommand()

Long is not required for row_id or list_size

paparazzo
  • 6k
  • 3
  • 19
  • 41