public DatabaseBuilder <TDatabase, TConnection> WithTable(IEnumerable <DatabaseEntry> tables) { foreach (var table in tables) { var type = table.GetType(); if (TableMap.ContainsKey(type)) { throw new InvalidOperationException("The specified table has already been added"); } TableMap.Add(type, table); _tables.Add(new KeyValuePair <Type, IImmutableSet <DatabaseColumnContext> >(type, (IImmutableSet <DatabaseColumnContext>)DatabaseEntry.GetColumns(type))); } return(this); }