public async Task <EventModel> GetEventAsync(int id) { var key = $"currentEvent-{id}"; var eventEntity = await GetOrCreateAsync(key, ev => _eventsRepository.GetEventAsync(id)); return(_mapper.Map <EventModel>(eventEntity)); }
public async Task <EventDto> GetEvent(Guid id) { var eventResult = await _eventsRepository.GetEventAsync(id); return(new EventDto(eventResult)); }
public async Task <EventModel> GetEventAsync(Guid id) { Event foundEvent = await _repository.GetEventAsync(id); return(_mapper.Map <EventModel>(foundEvent)); }