Exemple #1
0
 public SchemaResult AddXref(string left, string right)
 {
     try
     {
         SchemaDefinition schema = CurrentSchema;
         XrefTable        x      = new XrefTable(left, right);
         SchemaResult     result = schema.AddXref(x);
         if (AutoSave)
         {
             schema.Save();
         }
         return(result);
     }
     catch (Exception ex)
     {
         return(GetErrorResult(ex));
     }
 }
Exemple #2
0
 public SchemaResult AddTable(string tableName, string className = null)
 {
     try
     {
         SchemaDefinition schema = CurrentSchema;
         Table            t      = new Table();
         t.ClassName = className ?? tableName;
         t.Name      = tableName;
         SchemaResult result = schema.AddTable(t);
         if (AutoSave)
         {
             schema.Save();
         }
         return(result);
     }
     catch (Exception ex)
     {
         return(GetErrorResult(ex));
     }
 }