public async Task <ActionResult> Get(string id) { if (id == "") { throw new NullReferenceException("medicine not found"); } if (!_context.Medicines.Any()) { throw new NullReferenceException("medicine not found"); } var medicine = await _medicineService.Get(id); return(Ok(medicine)); }
public ActionResult <List <Medicine> > Get() => _medicineService.Get();