code_junkie

Collections from LINQ to SQL and the ability to filter

Nov 14th, 2011
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. BindingListCollectionView view;
  2. view = (BindingListCollectionView)CollectionViewSource.GetDefault (dataContext.Persons);
  3.  
  4. ObservebleCollection<Person> col = new ObservebleCollection<Person>(dataContext.Persons.ToList());
  5. ListCollectionView view = (ListCollectionView)CollectionViewSource.GetDefault(col);
  6.  
  7. var q = from p in Persons.AsBindable() select p;
Add Comment
Please, Sign In to add comment