예제 #1
0
 private void buttonBindCustomersData_Click(object sender, EventArgs e)
 {
     //Force the Context object to get fresh data!
     objContext = new EntityFrameworkDemosProcessor.EntityFrameworkDemosEntities();
     dataGridView2.DataSource = objContext.vCustomers ;
     //dataGridView2.Refresh(); You do not need to refresh the GridView manually!
 }
예제 #2
0
 private void buttonBindProductsData_Click(object sender, EventArgs e)
 {
     //Force the Context object to get fresh data!
     objContext = new EntityFrameworkDemosProcessor.EntityFrameworkDemosEntities();
     dataGridView1.DataSource = objContext.Products;
 }