public static EnumDataEntityCollection GetCachedCollection() { if (cachedCollection == null) { cachedCollection = Generate(); } return(cachedCollection); }
public static EnumDataEntityCollection Generate() { EnumDataEntityCollection set = new EnumDataEntityCollection(); Random rnd = new Random(); for (int i = 0; i < 999; i++) { set.Add(new EnumDataEntity() { ID = i.ToString(), Result = (SomeEnum)(i % 5) }); } return(set); }