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); }
public virtual void AddTable(DbTableDef table) { ValidState.AssertTrue(!Tables.ContainsKey(table.TableName)); Tables.Add(table.TableName, table); }