Ejemplo n.º 1
0
        public async Task <IActionResult> Get(int id, CancellationToken cancellationToken)
        {
            var c = await _eventCollectionRetrievalService
                    .GetCollectionByIdAsync(id, cancellationToken : cancellationToken);

            return(Ok(new EventCollectionDto(c)));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Get(int id, CancellationToken cancellationToken)
        {
            try
            {
                var c = await _eventCollectionRetrievalService
                        .GetCollectionByIdAsync(id, cancellationToken : cancellationToken);

                return(Ok(new EventCollectionDto(c)));
            }
            catch (NotFoundException e)
            {
                return(NotFound(e.Message));
            }
        }