Example #1
0
        public async Task <Tuple <IEnumerable <Department>, IEnumerable <Doctor> > > GetAsync()
        {
            _logger.LogDebug("GetAsync");
            IEnumerable <DepartmentDto> departments = await _dataWCFService.GetAllDepartmentsAsync();

            IEnumerable <ActualDoctorDto> doctors = await _dataWCFService.GetAllActualDoctorsAsync();

            IEnumerable <Department> deps = departments.Select(x => new Department {
                BusinessElementID = x.BusinessElementID.ToString(), BusinessElementFullName = x.BusinessElementFullName
            });
            IEnumerable <Doctor> docs = doctors.Select(x => new Doctor {
                FirstName = x.FirstName, SurName = x.SurName, Patronymic = x.Patronymic, PersonId = x.PersonId, PersonnelPositionList = x.PersonnelPositionList.Select(x => new PersonnelPosition {
                    PositionType = x.PositionType, IdPersonnel = x.IdPersonnel, Department = x.Department
                }).ToList()
            });

            return(new Tuple <IEnumerable <Department>, IEnumerable <Doctor> >(deps, docs));
        }
 public async Task <List <ActualDoctorDto> > GetAsync( )
 {
     _logger.LogDebug("GetAsync");
     return(await _dataWCFService.GetAllActualDoctorsAsync());
 }