i have watched the tutorial
How Do I: Build a WPF Data Entry Form Using Entity Framework?
i am confused why the need to change a CollectionViewSource/BindingListCollectionView to ObservableCollection/ListCollection
viewSource = (CollectionViewSource) this
result = from
viewSource.Source = result;
view = (BindingListCollectionView)viewSource.View;
to something like (end code )
var customerSource = ((CollectionViewSource)(this.FindResource("CustomerSource")));
var query = from c in db.Customers
where c.City == "Seattle"
this.CustomerData = new CustomerCollection(query, db);
customerSource.Source = this.CustomerData;
this.View = ((ListCollectionView)(customerSource.View));
also in CustomerCollection
protected override void InsertItem(int index, Customer cust)
protected override void RemoveItem(int index)
then in here, why the need to insert/delete the customer from the context then from the base collection view? then why dont i need the same for update?
View Complete Post