Ejemplo n.º 1
0
        public void AddDisaster(Disaster newDisaster)
        {
            MySqlConnection conn = DB.Connection();

            conn.Open();
            var cmd = conn.CreateCommand() as MySqlCommand;

            conn.Close();
            if (conn != null)
            {
                conn.Dispose();
            }
        }
        public static Disaster Find(int id)
        {
            MySqlConnection conn = DB.Connection();

            conn.Open();
            var      cmd         = conn.CreateCommand() as MySqlCommand;
            Disaster newDisaster = new Disaster(disasterName, disasterId);

            conn.Close();
            if (conn != null)
            {
                conn.Dispose();
            }

            return(newDisaster);
        }