public async Task <IActionResult> Get(int id, CancellationToken cancellationToken) { var c = await _eventCollectionRetrievalService .GetCollectionByIdAsync(id, cancellationToken : cancellationToken); return(Ok(new EventCollectionDto(c))); }
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)); } }