public IActionResult Get(int id) { Domain.Entities.Medications.Medication medication = _medicationService.GetAll().Find(m => m.Id.Equals(id)); if (medication == null) { return(BadRequest()); } return(Ok(medication)); }
public async Task <ApiResponse> GetAll(string externalId) { try { var responseModel = await _objControllerHelper.GetAll(externalId); return(new ApiResponse(responseModel, 200)); } catch (Exception ex) { throw new ApiException(ex); } }
public async Task <IActionResult> GetAllAsync() { var result = await medicationService.GetAll().ConfigureAwait(false); return(base.Ok(result)); }
public IActionResult GetAll() { return(Ok(_medicationService.GetAll())); }