private async Task ExecuteDefaultCategoriesCommand() { var defaultList = await OneService.GenerateDefaultCategoriesAsync(); if (Categories == null) { Categories = new ObservableRangeCollection <CategoryModel>(defaultList); } else { Categories.ReplaceRange(defaultList); } }
private async Task SetCategories() { var defaultList = await OneService.GenerateDefaultCategoriesAsync(); if (Categories == null) { Categories = new ObservableRangeCollection <CategoryModel>(defaultList); } else { Categories.ReplaceRange(defaultList); } ConsoleWrite("Созданы категории сортировки..."); }