public void import(IFormFile file) { _fileRep.CreateFile(file); var list = _fileRep.read(file.FileName); foreach (var icon in list) { _companyRep.Create_Company(icon.companyName); var company = _companyRep.Get_Company(icon.companyName); _medicineRep.Create_Medicine(icon.medicineName, company); } }