public IActionResult Get(long key)
        {
            RequestStatus status = _repository.Find(key);

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

            return(new ObjectResult(status));
        }
Пример #2
0
        public ActionResult <RequestStatus> DeleteRequestStatus(int id)
        {
            var requestStatus = _requestStatusRepository.Find(id);

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

            _requestStatusRepository.Delete(id);
            _requestStatusRepository.Save();

            return(Ok());
        }