Beispiel #1
0
        public static void InsertMovie()
        {
            CinemaDBDataContext db = new CinemaDBDataContext(conString);


            var insertedMovie = new movy();

            insertedMovie.titolo = "Lala Land";
            insertedMovie.durata = 123;
            insertedMovie.genere = "Romantico";

            db.movies.InsertOnSubmit(insertedMovie);

            try
            {
                db.SubmitChanges();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            SelectMovies();
        }
Beispiel #2
0
 partial void Deletemovy(movy instance);
Beispiel #3
0
 partial void Updatemovy(movy instance);
Beispiel #4
0
 partial void Insertmovy(movy instance);