public static XElement Save(this ISqlServerRecord _this)
        {
            var root = new XElement(Xml.SqlServerRecord.NodeName);

            var name = new XElement(Xml.SqlServerRecord.RecordName);

            name.SetAttributeValue(Xml.Attributes.Value, _this.RecordName);
            root.Add(name);

            var sqlServer = new XElement(Xml.SqlServerRecord.SqlServer);

            sqlServer.SetAttributeValue(Xml.Attributes.Value, _this.SqlServer);
            root.Add(sqlServer);

            var sqlUser = new XElement(Xml.SqlServerRecord.SqlAdminUsername);

            sqlUser.SetAttributeValue(Xml.Attributes.Value, _this.SqlAdminUsername);
            root.Add(sqlUser);

            var sqlPassword = new XElement(Xml.SqlServerRecord.SqlAdminPassword);

            sqlPassword.SetAttributeValue(Xml.Attributes.Value, _this.SqlAdminPassword);
            root.Add(sqlPassword);

            return(root);
        }
 public void UpdateSelected(string oldName, ISqlServerRecord record)
 {
     if (_entities.FirstOrDefault(p => p.RecordName == oldName) is SqlServerRecord selected)
     {
         selected.RecordName       = record.RecordName;
         selected.SqlServer        = record.SqlServer;
         selected.SqlAdminUsername = record.SqlAdminUsername;
         selected.SqlAdminPassword = record.SqlAdminPassword;
     }
 }
 public void Add(ISqlServerRecord record)
 {
     _entities = _entities.Append(record);
 }