Exemple #1
0
        public void UpdateDatabaseConnection(DatabaseConnectionType dbs)
        {
            XElement db = (from xml2 in _xDocument.Descendants("Database")
                           select xml2).FirstOrDefault();

            if (db != null)
            {
                db.Element("FileLocation").Value = dbs.FileLocation;
                db.Element("Provider").Value     = dbs.Provider;
                db.Element("TableName").Value    = dbs.TableName;
            }
        }
Exemple #2
0
        public DatabaseConnectionType GetDatabaseConnection()
        {
            XElement db = (from xml2 in _xDocument.Descendants("Database")
                           select xml2).FirstOrDefault();
            var dbs = new DatabaseConnectionType();

            if (db != null)
            {
                dbs.FileLocation = db.Element("FileLocation").Value;
                dbs.Provider     = db.Element("Provider").Value;
                dbs.TableName    = db.Element("TableName").Value;
            }
            return(dbs);
        }