Пример #1
0
        public async Task <List <Professor> > GetAllProfessors(CancellationToken token)
        {
            var professors     = new List <ApiModel.Professor>();
            var dataProfessors = await _dbContext.GetProfessors(token);

            foreach (var professor in dataProfessors)
            {
                var apiProfessor = ProfessorConverter.EntityToApiModel(professor);
                professors.Add(apiProfessor);
            }

            return(professors);
        }