public void CreateDoctor() { Console.WriteLine("Введите фамилию"); var surname = Console.ReadLine(); Console.WriteLine("Введите имя"); var name = Console.ReadLine(); Console.WriteLine("Введите отчество"); var middleName = Console.ReadLine(); Console.WriteLine("Номер кабинета"); var consultingRoom = Console.ReadLine(); var doctor = new Doctor { Surname = surname, Name = name, MiddleName = middleName, ConsultingRoom = consultingRoom, }; var creationProcess = _doctorService.AddAsync(doctor); Task.WaitAll(creationProcess); Console.WriteLine("Врач добавлен успешно"); Console.ReadKey(); }