| 1234567891011121314151617181920 |
- using Recepie.Models;
- namespace Recepie.ViewModels
- {
- public class RecipeIndexViewModel
- {
- public List<Recipe> Recipes { get; set; } = new List<Recipe>();
- public string SearchTerm { get; set; } = string.Empty;
- public string IncludeIngredients { get; set; } = string.Empty;
- public string ExcludeIngredients { get; set; } = string.Empty;
- public string SelectedCategory { get; set; } = string.Empty;
- public List<string> Categories { get; set; } = new List<string>();
- public int TotalRecipes => Recipes.Count;
- public bool HasFilters => !string.IsNullOrEmpty(SearchTerm) ||
- !string.IsNullOrEmpty(IncludeIngredients) ||
- !string.IsNullOrEmpty(ExcludeIngredients) ||
- !string.IsNullOrEmpty(SelectedCategory);
- }
- }
|