public async override Task <DoctorDto> GetByIdAsync(int id)
        {
            string sql = "exec [dbo].[GetDoctor] @id";

            using (SqlConnection connection = new SqlConnection(_connectionString))
                using (SqlCommand command = connection.CreateCommand())
                {
                    connection.Open();
                    command.CommandText = sql;
                    command.Parameters.AddWithValue("id", id);
                    using (var reader = await command.ExecuteReaderAsync())
                    {
                        reader.Read();
                        var doctor = await ParserExtension.DoctorParser(reader);

                        return(doctor);
                    }
                }
        }
        public async override Task <IEnumerable <DoctorDto> > GetAllAsync()
        {
            var    doctors = new List <DoctorDto>();
            string sql     = "exec [dbo].[GetAllDoctors]";

            using (SqlConnection connection = new SqlConnection(_connectionString))
                using (SqlCommand command = connection.CreateCommand())
                {
                    connection.Open();
                    command.CommandText = sql;
                    using (var reader = await command.ExecuteReaderAsync())
                    {
                        while (reader.Read())
                        {
                            var doctor = await ParserExtension.DoctorParser(reader);

                            doctors.Add(doctor);
                        }
                    }
                    return(doctors);
                }
        }
        public async Task <IEnumerable <DoctorDto> > SearchAsync(string pattern)
        {
            var    doctors = new List <DoctorDto>();
            string sql     = "exec [dbo].[SearchDoctors] @pattern";

            using (SqlConnection connection = new SqlConnection(_connectionString))
                using (SqlCommand command = connection.CreateCommand())
                {
                    connection.Open();
                    command.CommandText = sql;
                    command.Parameters.AddWithValue("pattern", pattern);
                    using (var reader = await command.ExecuteReaderAsync())
                    {
                        while (reader.Read())
                        {
                            var doctor = await ParserExtension.DoctorParser(reader);

                            doctors.Add(doctor);
                        }
                    }
                    return(doctors);
                }
        }