DataTeacherViewModel.cs 777 B

12345678910111213141516171819202122
  1. using Avalonia.Controls;
  2. using Microsoft.EntityFrameworkCore;
  3. using ReactiveUI;
  4. using AVSchool.Models;
  5. using AVSchool.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 AVSchool.ViewModels
  13. {
  14. public class DataTeacherViewModel : ViewModelBase
  15. {
  16. public List<Teacher> TeachersData => MainWindowViewModel.connect.Teachers.Include(x => x.IdGenderNavigation).
  17. Include(x => x.CourseTeachers).ThenInclude(x => x.IdCourseNavigation).
  18. Include(x => x.DisciplinesTaughts).ThenInclude(x => x.IdItemNavigation).ToList();
  19. }
  20. }