static void Main(string[] args) { MySqlDb fleet = new MySqlDb("db4free.net", "cs371student", "whitworth", "cs371ado"); fleet.OpenConnection(); List <Ship> ships = fleet.GetAllShips(); foreach (Ship s in ships) { Console.WriteLine("{0} has registration number {1}", s.Name, s.Registration); } }
static void Main(string[] args) { // Initialize the connection with Database MySqlDb chatdb = new MySqlDb("sql3.freesqldatabase.com", "sql3319340", "bFxgnIiN4x", "sql3319340"); chatdb.OpenConnection(); chatdb.displayAllMessages(); chatdb.OpenConnection(); chatdb.EnterMessage("Jerry", "Caird", "Hows it go?"); chatdb.displayAllMessages(); }