Exemplo n.º 1
0
        public ActionResult <SingleRecordDto> GetRecord(string recordId)
        {
            try
            {
                if (!_recordsRepository.RecordExists(recordId))
                {
                    return(NotFound());
                }

                var record = _recordsRepository.GetRecord(recordId);

                return(Ok(_mapper.Map <SingleRecordDto>(record)));
            }
            catch
            {
                return(StatusCode(StatusCodes.Status500InternalServerError));
            }
        }