DataTeachersViewModel.cs 774 B

12345678910111213141516171819202122
  1. using Avalonia.Controls;
  2. using Microsoft.EntityFrameworkCore;
  3. using ReactiveUI;
  4. using scool.Models;
  5. using scool.Views;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Data;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. namespace scool.ViewModels
  13. {
  14. public class DataTeachersViewModel : ViewModelBase
  15. {
  16. public List<Teacher> TeachersData => MainWindowViewModel.connect.Teachers.Include(x => x.IdGenderNavigation).
  17. Include(x => x.TeachersCourses).ThenInclude(x => x.IdCourseNavigation).
  18. Include(x => x.TeachersSubjects).ThenInclude(x => x.IdSubjectNavigation).ToList();
  19. }
  20. }