public async Task <IActionResult> Get(List <MedicineDemand> m) { try { var res = await _provider.GetSupply(m); if (res.Count > 0) { return(Ok(res)); } return(NotFound("No such details found please try again.")); } catch (Exception) { return(StatusCode(500)); } }
public async Task <IActionResult> Get(List <MedicineDemand> m) { try { var res = await _provider.GetSupply(m); if (res != null) { _log4net.Info("Pharmacy supply details successfully retrieved and sent."); return(Ok(res)); } _log4net.Info("No details retrieved"); return(NotFound("No such details found please try again.")); } catch (Exception e) { _log4net.Error("Excpetion:" + e.Message + " has occurred while trying to retrieve supply info."); return(StatusCode(500)); } }