Ejemplo n.º 1
0
        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");
        }
Ejemplo n.º 2
0
        private void InitializeTable <T> (ITableFactory factory) where T : Data <T>
        {
            var table = factory.CreateTable <T>();

            tables.Add(typeof(T), table);
        }