private void btnPrescriptonAdd_Click(object sender, EventArgs e) { string drugs = string.Empty; foreach (var item in lstDrugs.Items) { drugs += item + ","; } Prescription prescription = new Prescription { PatientId = 2, PrescriptionDate = DateTime.Now, Drugs = drugs }; var result = prescriptionManagement.AddPrescription(prescription); lstDrugs.Items.Clear(); }