using System; using System.Collections.Generic; using Learn.Models; using Microsoft.EntityFrameworkCore; using ReactiveUI; using System.Linq; namespace Learn.ViewModels { internal class PageShowServiceViewModel : ViewModelBase { private List _serviceList; public List ServiceList { get => _serviceList; set => this.RaiseAndSetIfChanged(ref _serviceList, value); } public PageShowServiceViewModel() { FillList(); } public void FillList() { ServiceList = MainWindowViewModel.myConnection.Services.Include(photo => photo.ServicePhotos).ToList(); } } }