public IActionResult Get(string name) { if (_medicineRepository.GetMedicine(name) == null) { return(NotFound("Medicine Not Found")); } return(Ok(_medicineRepository.GetMedicine(name))); }
public async Task <ActionResult <Medicine> > GetMedicine(int id) { var medicine = await _repository.GetMedicine(id); if (medicine == null) { return(NotFound()); } return(medicine); }
public async Task <IActionResult> GetMedicine(int id) { var medicine = await _medicineRepository.GetMedicine(id); if (medicine == null) { return(NotFound()); } var medicineResult = new MedicineListDto() { Id = medicine.Id, Name = medicine.Name, Description = medicine.Description, Manufacture = medicine.Manufacture, Supplier = medicine.Supplier }; return(Ok(medicineResult)); }
public async Task <ActionResult <IEnumerable <Medicine> > > GetMedicine() { _log4net.Info("Controller of Medicines Project"); return(Ok(_medicineRepository.GetMedicine())); }
public string BuyMedicine(int medicineID) { IMedicine medicine = medicineRepo.GetMedicine(medicineID); return(medicine.Price.ToString()); }
public Medicine GetMedicineDetails(int id) { return(m_MedicineRepository.GetMedicine(id)); }