示例#1
0
        public DbTableDef GetOrAddTable(string tableName, DbTableType tt)
        {
            // add a table. No dupes.
            if (string.IsNullOrWhiteSpace(tableName))
            {
                return(null);
            }
            DbTableDef table;

            if (Tables.TryGetValue(tableName, out table))
            {
                // its ok to change DbTableType ?
                return(table);
            }
            table = new DbTableDef(tableName, tt);
            AddTable(table);
            return(table);
        }
示例#2
0
 public virtual void AddTable(DbTableDef table)
 {
     ValidState.AssertTrue(!Tables.ContainsKey(table.TableName));
     Tables.Add(table.TableName, table);
 }