Example #1
0
        public async Task <ActionResult> Get(int EventId)
        {
            try
            {
                var evento = await _repo.GetEventAsyncById(EventId, true);

                var result = _mapper.Map <EventDtos>(evento);

                return(Ok(result));
            }
            catch (System.Exception ex)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, $"Banco de dados Falhou {ex.Message}"));
            }
        }