Beispiel #1
0
        public ActionResult DeleteRecord(string recordId)
        {
            try
            {
                if (!_recordsRepository.RecordExists(recordId))
                {
                    return(NotFound());
                }

                _recordsRepository.DeleteRecord(recordId);

                return(NoContent());
            }
            catch
            {
                return(StatusCode(StatusCodes.Status500InternalServerError));
            }
        }
        public ActionResult DeleteRecord(string employeeId, DateTime checkDate)
        {
            try
            {
                if (!_recordsRepository.RecordExists(employeeId, checkDate))
                {
                    return(NotFound());
                }

                _recordsRepository.DeleteRecord(employeeId, checkDate);

                return(NoContent());
            }
            catch
            {
                return(StatusCode(StatusCodes.Status500InternalServerError));
            }
        }