PersonalInformationViewModel.cs 661 B

1234567891011121314151617181920
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using AvaloniaTeachersDB.Models;
  5. using Microsoft.EntityFrameworkCore;
  6. using ReactiveUI;
  7. namespace AvaloniaTeachersDB.ViewModels
  8. {
  9. public class PersonalInformationViewModel : ReactiveObject
  10. {
  11. public static _43pToropovaContext DBConnection = new _43pToropovaContext();
  12. public List<Teacher> listTeachers => DBConnection.Teachers
  13. .Include(x => x.IdGenderNavigation)
  14. .Include(x => x.TeacherCourses).ThenInclude(x => x.IdCourseNavigation)
  15. .Include(x => x.TeachersSubjects).ThenInclude(x => x.IdSubjectsNavigation)
  16. .ToList();
  17. }
  18. }