Пример #1
0
        public static SilosContainer InitDb()
        {
            SilosContainer silosContainer = new SilosContainer();
            silosContainer.c = new List<Silos>(SizeFirstBlock + SizeSecondBlock);
            for (int i = 0; i < SizeFirstBlock + SizeSecondBlock; i++)
                silosContainer.c.Add(new Silos());

            Db.Set(silosContainer);
            Db.Set(silosContainer.c);

            return GetInstanceFromDb();
        }
Пример #2
0
        public static void Init()
        {
            int numRec = Db.GetAll<SilosContainer>().Count;

            _instance = GetInstanceFromDb();
            if (_instance == null)
                _instance = InitDb();
        }