Inheritance: DbContext
コード例 #1
0
ファイル: Form1.cs プロジェクト: vsite-prog/DOTN
 private void Form1_Load(object sender, EventArgs e)
 {
     db = new BazaEntities();
     var klad = (from p in db.parovi
                  select p.klad_id)
                 .Distinct();
     cb_kladionica.DataSource = klad.ToList();
     /*
     var kladionice = from k in db.parovi
                      select new { Naziv = k.naziv, Koeficijent = k.koef };
     dataGridView1.DataSource = kladionice.ToList();
      * */
 }
コード例 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            db = new BazaEntities();
            var klad = (from p in db.parovi
                        select p.klad_id)
                       .Distinct();

            cb_kladionica.DataSource = klad.ToList();

            /*
             * var kladionice = from k in db.parovi
             *               select new { Naziv = k.naziv, Koeficijent = k.koef };
             * dataGridView1.DataSource = kladionice.ToList();
             * */
        }