// This event is generated by Data Source Configuration Wizard void entityInstantFeedbackSource2_GetQueryable(object sender, DevExpress.Data.Linq.GetQueryableEventArgs e) { // Instantiate a new DataContext Entity_Framework_Data.DBContext dataContext = new Entity_Framework_Data.DBContext(); // Assign a queryable source to the EntityInstantFeedbackSource e.QueryableSource = dataContext.DimProducts; // Assign the DataContext to the Tag property, // to dispose of it in the DismissQueryable event handler e.Tag = dataContext; }
public Form1() { InitializeComponent(); // This line of code is generated by Data Source Configuration Wizard // Instantiate a new DBContext Entity_Framework_Data.DBContext dbContext = new Entity_Framework_Data.DBContext(); // Call the Load method to get the data for the given DbSet from the database. dbContext.DimProducts.Load(); // This line of code is generated by Data Source Configuration Wizard dimProductsBindingSource.DataSource = dbContext.DimProducts.Local.ToBindingList(); }