public static List <ModelObject> ToList(this ModelObjectEnumerator modelObjectEnumerator) { ModelObjectEnumerator.AutoFetch = true; try { if (modelObjectEnumerator == null) { return(null); } var objs = new List <ModelObject>(); modelObjectEnumerator.Reset(); foreach (ModelObject modelObject in modelObjectEnumerator) { objs.Add(modelObject); } return(objs); } catch { return(new List <ModelObject>()); }; }