Example #1
0
        private void CreateItems()
        {
            List <int> ets = Ets.GetEntityTypes().ToArray().Where(et => et.TargetTypesList.Contains(eTarget.Items)).Select(et => et.Id).ToList();

            for (int i = 0; i < TOTAL_ITEMS; ++i)
            {
                int    index = i % ets.Count;
                CFItem e     = Is.CreateEntity <CFItem>(ets[index]);
                e.SetName("Item " + (i + 1));
                e.SetDescription("Description for Item " + (i + 1));

                Is.UpdateStoredItem(e);
            }

            Db.SaveChanges();
        }