Ejemplo n.º 1
0
        public void SetOrder(BeerSortOrder inSortOrder)
        {
            switch (inSortOrder)
            {
            case BeerSortOrder.AZ:
                Beers = new ObservableCollection <BeerViewModel>(Beers
                                                                 .OrderBy(X => X.Beer.BreweryName)
                                                                 .ThenBy(X => X.Beer.BeerName));
                break;

            case BeerSortOrder.Fav:
                Beers = new ObservableCollection <BeerViewModel>(Beers
                                                                 .OrderByDescending(X => X.Beer.MetaData.IsFavorited)
                                                                 .ThenBy(X => X.Beer.BreweryName)
                                                                 .ThenBy(X => X.Beer.BeerName));
                break;
            }
        }
Ejemplo n.º 2
0
 public void SetOrder(BeerSortOrder inSortOrder)
 {
     BeerViewModel.SetOrder(inSortOrder);
 }