예제 #1
0
 public IActionResult Delete(string icuId)
 {
     try
     {
         _configurationRepository.RemoveIcu(icuId);
         return(Ok());
     }
     catch
     {
         return(BadRequest());
     }
 }
예제 #2
0
        public ActionResult DeleteIcu(string id)
        {
            var IcuModelFromRepository = _repository.GetIcuById(id);

            if (IcuModelFromRepository == null)
            {
                return(NotFound());
            }

            _repository.RemoveIcu(IcuModelFromRepository);
            _repository.SaveChanges();

            return(Ok());
        }