/// <summary>Constructor</summary>
 /// <param name="client">Spotify Sdk Client</param>
 public CategoriesPageViewModel(ISpotifySdkClient client) :
     base(client)
 {
     Categories = new ListCategoryViewModel(client);
     // Commands
     client.CommandActions.Category = (item) => NavigatePage(item);
 }
Exemplo n.º 2
0
        public ActionResult ListCategory(String Nombre, Int32?p)
        {
            var ListCategoryViewModel = new ListCategoryViewModel();

            ListCategoryViewModel.CargarDatos(CargarDatosContext(), p, Nombre);
            return(View(ListCategoryViewModel));
        }
Exemplo n.º 3
0
        public async Task ListCategoryViewModel_Test()
        {
            // Arrange
            var model = new ListCategoryViewModel(_client);

            // Act
            await((ISupportIncrementalLoading)model.Collection).LoadMoreItemsAsync(count);
            // Assert
            Assert.IsTrue(model.Collection.Count > 0);
        }
Exemplo n.º 4
0
        public async Task <IActionResult> List()
        {
            var categories = await _categoryService.GetAll();

            ListCategoryViewModel model = new ListCategoryViewModel
            {
                Categories = categories
            };

            return(View(model));
        }
        public ListCategoryViewModel FillModel()
        {
            var model = new ListCategoryViewModel();

            try {
                var db = new ApplicationDbContext();
                model.Categories = GetCategories();
                return(model);
            }
            catch
            {
                model.Categories = new List <CategoryModel>();
                return(model);
            }
        }