public async Task <IActionResult> GetDrug([FromRoute] int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var drug = await _drugRepository.FindAsync(id); if (drug == null) { return(NotFound()); } return(Ok(drug)); }