internal void AddDishes(BillDTO bill, List <DishDTO> dishDTOs) { int billId = new BillDAL().FindByTableNumber(bill.TableNumber).ID; DBConnection conn = new(); if (conn.Open()) { foreach (DishDTO dish in dishDTOs) { int id = new DishDAL().FindByName(dish.Name).Id; string cmd = "INSERT INTO dishbillrelation" + "(dishID, billID)" + "VALUES" + $"('{id}', '{billId}'); "; conn.RunCommand(cmd); } conn.Close(); } }