public string AddTable(string type, int tableNumber, int capacity) { ITable tableToCreate = tableFactory.CreateTable(type, tableNumber, capacity); this.tables.Add(tableToCreate); return($"Added table number {tableToCreate.TableNumber} in the restaurant"); }
private void InitializeTable <T> (ITableFactory factory) where T : Data <T> { var table = factory.CreateTable <T>(); tables.Add(typeof(T), table); }