EF in WinForms: how to filter data in BindingSource/DGW (.Local.ToBindingList())
问题 I generated an EF model (Database first) and DataSource following this tutorial http://msdn.microsoft.com/en-us/data/jj682076.aspx On my form I created BindingSource (bsUsers) and bound DataGridView to it. Here is how I load data on form startup: _myDbContext = new MyDbContext(); _myDbContext.Users.Load(); bsUsers.DataSource = _myDbContext.Users.Local.ToBindingList(); It works, I can add and modify records using DataGridView and other bound controls. But the thing I didn't figure out is how