Пример #1
0
 public Node(ActualDbObject dbObject)
 {
     Id     = dbObject.ID;
     Parent = -1;
     Name   = dbObject.Name;
     Links  = new List <string>();
 }
Пример #2
0
        public void PopulateTable()
        {
            try
            {
                using (var storage = new StorageContext(StorageContext.constr))
                {
                    storage.Database.ExecuteSqlCommand("DELETE FROM ActualDbObjects");
                    //storage.actualDbObjects.
                    foreach (var result in Result)
                    {
                        var dbObject = new ActualDbObject();
                        dbObject.Name = result.Key;
                        dbObject.Type = result.Value;

                        storage.actualDbObjects.Add(dbObject);
                    }
                    storage.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex.Message);
                throw;
            }
        }