public void AddSupplyToDB(List <Supply> supplies) { try { foreach (var s in supplies) { SupplyDto supply = new SupplyDto() { MedicineName = s.MedicineName, PharmacyName = s.PharmacyName, SupplyCount = s.SupplyCount }; _supplyRepo.Add(supply); } } catch (Exception) { throw; } }
public void AddSupplyToDB(List <Supply> supplies) { try { foreach (var s in supplies) { SupplyDto supply = new SupplyDto() { MedicineName = s.MedicineName, PharmacyName = s.PharmacyName, SupplyCount = s.SupplyCount }; _log.Info("Adding supplies to database"); _supplyRepo.Add(supply); } } catch (Exception e) { _log.Error("Error while adding supplies to database - " + e.Message); throw; } }