public void RemoveTableTest()
        {
            if (table1 == null)
            {
                AddNewTableTest();
            }

            ManagerLogInTest();

            bool result = managerDataAccess.RemoveTable(managerContext1.Id, table1.Id);

            Assert.IsTrue(result);

            var tables = managerDataAccess.GetTables(managerContext1.Id);

            if (tables != null && tables.Any())
            {
                var removedTable = tables.FirstOrDefault(t => t.Id == table1.Id);
                Assert.IsNull(removedTable);
            }

            result = managerDataAccess.EditTable(managerContext1.Id, table1);
            Assert.IsFalse(result);

            ManagerLogOutTest();
        }
        public bool DeleteTable(int id)
        {
            bool result;

            try
            {
                result = _managerDataAccess.RemoveTable(id);
            }
            catch
            {
                throw new Exception("Exception from DB");
            }

            return(result);
        }