using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using ohjaus5; namespace edm { public partial class edm : Form { BindingSource reseptit = new BindingSource(); public ohjaus5.ohjaus5Entities Ctx; public edm() { InitializeComponent(); Ctx = new ohjaus5Entities(); } private void edm_Load(object sender, EventArgs e) { reseptit.DataSource = from r in Ctx.Resepti from p in Ctx.Liittyy where p.Resepti_ReseptiID == r.ReseptiID select r; listBoxReseptit.DataSource = reseptit; Resepti foo = new Resepti(); foo.Henkilomaara = 4; // foo.Aine = } } }