//Заполнение всех списков значениями private async void GetTables() => await Task.Run(() => { Organizations = (List <Organization>)NirsSystem.GetListObject <Organization>(); if (Organizations == null) { Organizations = new List <Organization>(); } Organizations.Insert(0, new Organization { OrganizationId = 0, OrganizationName = "(пусто)" }); SelectedOrganization = Organizations.FirstOrDefault(u => u.OrganizationId == _author.OrganizationId); OnPropertyChanged("Organizations"); OnPropertyChanged("SelectedOrganization"); Faculties = (List <Faculty>)NirsSystem.GetListObject <Faculty>(); if (Faculties == null) { Faculties = new List <Faculty>(); } Faculties.Insert(0, new Faculty { FacultyId = 0, FacultyName = "(пусто)" }); SelectedFaculty = Faculties.FirstOrDefault(u => u.FacultyId == _author.FacultyId); OnPropertyChanged("Faculties"); OnPropertyChanged("SelectedFaculty"); Departments = (List <Department>)NirsSystem.GetListObject <Department>(); if (Departments == null) { Departments = new List <Department>(); } Departments.Insert(0, new Department { DepartmentId = 0, DepartmentName = "(пусто)" }); SelectedDepartment = Departments.FirstOrDefault(u => u.DepartmentId == _author.DepartmentId); OnPropertyChanged("Departments"); OnPropertyChanged("SelectedDepartment"); Groups = (List <Group>)NirsSystem.GetListObject <Group>(); if (Groups == null) { Groups = new List <Group>(); } Groups.Insert(0, new Group { GroupId = 0, GroupName = "(пусто)" }); SelectedGroup = Groups.FirstOrDefault(u => u.GroupId == _author.GroupId); OnPropertyChanged("Groups"); OnPropertyChanged("SelectedGroup"); Positions = (List <Position>)NirsSystem.GetListObject <Position>(); if (Positions == null) { Positions = new List <Position>(); } Positions.Insert(0, new Position { PositionId = 0, PositionName = "(пусто)" }); SelectedPosition = Positions.FirstOrDefault(u => u.PositionId == _author.PositionId); OnPropertyChanged("Positions"); OnPropertyChanged("SelectedPosition"); AcademicDegrees = (List <AcademicDegree>)NirsSystem.GetListObject <AcademicDegree>(); if (AcademicDegrees == null) { AcademicDegrees = new List <AcademicDegree>(); } AcademicDegrees.Insert(0, new AcademicDegree { AcademicDegreeId = 0, AcademicDegreeName = "(пусто)" }); SelectedAcademicDegree = AcademicDegrees.FirstOrDefault(u => u.AcademicDegreeId == _author.AcademicDegreeId); OnPropertyChanged("AcademicDegrees"); OnPropertyChanged("SelectedAcademicDegree"); });