Example #1
0
        public IActionResult Get([FromRoute] Guid id)
        {
            var response = _messageService.Get(id);

            if (!response.IsSuccessful)
            {
                return(BadRequest(response.ProblemDetails));
            }

            if (response.Data == null)
            {
                return(NotFound());
            }

            return(Ok(MessageResponse.FromEntity(response.Data)));
        }