public void CopyTo(TEntity[] array, int arrayIndex) { var items = AllItems.ToArray(); Array.Copy(items, 0, array, arrayIndex, items.Length); }