private void frmMgsTissutestEF_Load(object sender, EventArgs e)
        {

            //// Create the Context
            //EntityConnection conn = new EntityConnection("name= ModelWFAEFContainer");
            //ObjectContext context = new ObjectContext(conn);
            var ctx = new ModelStockContainer();
            var query = ctx.ArticlesSet.Where(c => c.IdArticles >= 0);
            articlesBindingSource.DataSource = query.ToList();

            //EntityConnection conn = new EntityConnection("name= ModelStockContainer");
            //ObjectContext context = new ObjectContext(conn);
            // customerBindingSource.DataSource = query.ToList();

        }
Exemplo n.º 2
0
 public ModelStockContainer thisContainer; // déclaration du model container
 public frmMgsTissu()
 {
     InitializeComponent();
     // Instantiate the container
     thisContainer = new ModelStockContainer();
 }