Esempio n. 1
0
        private void SelectButton_Click(object sender, EventArgs e)
        {
            // get the entity collection
            DafestyEntities context = new DafestyEntities();

            //short vc = Convert.ToInt16(VideoCodeTextBox.Text.ToString());
            // queries a entity collection! Not the database.
            var q = from x in context.Movie where x.VideoCode == 1 select x;

            var m = q.First();

            MovieTitleLabel.Text = m.MovieTitle;
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            DafestyEntities context = new DafestyEntities();

            dataGridView1.DataSource = context.Movie.ToList();
        }