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);
            }
        }
Exemple #3
0
        public async Task <IActionResult> GetAllAsync()
        {
            var result = await medicationService.GetAll().ConfigureAwait(false);

            return(base.Ok(result));
        }
Exemple #4
0
 public IActionResult GetAll()
 {
     return(Ok(_medicationService.GetAll()));
 }