Exemplo n.º 1
0
        private void CreateCollections()
        {
            List <int> ets = Ets.GetEntityTypes().ToList().Where(et => et.TargetTypesList.Contains(eTarget.Collections)).Select(et => et.Id).ToList();

            for (int i = 0; i < TOTAL_COLLECTIONS; ++i)
            {
                int          index = i % ets.Count;
                CFCollection c     = Cs.CreateEntity <CFCollection>(ets[index]);
                c.SetName("Collection " + (i + 1));
                c.SetDescription("Description for Collection " + (i + 1));

                Cs.UpdateStoredCollection(c);
            }

            Db.SaveChanges();
        }