コード例 #1
0
        public IActionResult GetDrugDetailByName(string drug_name)
        {
            _log4net.Info(" Http GET Request for Drug Details By Name");
            try
            {
                var obj = _drug.searchDrugsByName(drug_name);
                if (obj == null)
                {
                    return(NotFound());
                }

                return(Ok(obj));
            }
            catch (Exception)
            {
                return(BadRequest());
            }
        }