using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using ReactiveUI; using TourAgent.Models; using TourAgent.Views; namespace TourAgent.ViewModels { public class ToursViewModel : ReactiveObject { UP_SmirnovContext DB = new UP_SmirnovContext(); private List? _tours; public List? Tours { get => _tours; set => this.RaiseAndSetIfChanged(ref _tours, value); } private List? _types; public List? Types { get => _types; set => this.RaiseAndSetIfChanged(ref _types, value); } private bool _checkOrNot = false; public bool CheckOrNot { get => _checkOrNot; set { _checkOrNot = value; Filter(); } } private string? _findTour; public string? FindTour { get => _findTour; set { _findTour = value; Filter(); } } public ToursViewModel() { Tours = DB.Tours.ToList(); Types = DB.Types.Select(x=>x.Name).ToList(); Types.Insert(0, "Βρε"); } public void Filter() { } } }