static void Main()
        {
            // create an object to execute the tasks
            LibraryDBTasks taskExecutor = new LibraryDBTasks();
            Console.Write("Enter pass: "******"--------------------------------------------");

            // task 02 - find a book by name
            Console.Write("Enter the book's name: ");
            string bookName = Console.ReadLine();
            taskExecutor.FindABookByName(bookName, pass);
            Console.WriteLine("--------------------------------------------");

            // task 03 - add new book

            //creating the book object
            Book bookToAdd = new Book("Book", 3, "10/04/2000", "4-231-432-23-432");
            // executing the task
            taskExecutor.AddBook(bookToAdd, pass);
            Console.WriteLine("Book added!");
            Console.WriteLine("--------------------------------------------");
        }
        public void AddBook(Book bookToAdd, string password)
        {
            // connect to the database
            MySqlConnection dbCon = new MySqlConnection(dbConnection + password);
            // open the database
            dbCon.Open();

            // the sql query string to insert the book
            string addBook = string.Format("INSERT INTO books (Title, AuthorID, PublishDate, ISBN)" +
                                                            "VALUES ('{0}', {1}, STR_TO_DATE('{2}','%d/%m/%Y'), '{3}')", bookToAdd.title, bookToAdd.authorID, bookToAdd.date, bookToAdd.isbn);

            using (dbCon)
            {
                MySqlCommand addNewBook = new MySqlCommand(addBook, dbCon);

                addNewBook.ExecuteNonQuery();
            }
        }