public async Task <IEnumerable <AgendaTrackDto> > HandleAsync(GetAgenda query) { var dtos = _requestStorage.Get <IEnumerable <AgendaTrackDto> >(GetStorageKey(query.ConferenceId)); if (dtos is not null) { return(dtos); } var agendaTracks = await _agendaTracks .Include(at => at.Slots) .ThenInclude(at => (at as RegularAgendaSlot).AgendaItem) .ThenInclude(ai => ai.Speakers) .Where(at => at.ConferenceId == query.ConferenceId) .ToListAsync(); dtos = agendaTracks?.Select(at => at.AsDto()); _requestStorage.Set(GetStorageKey(query.ConferenceId), dtos, TimeSpan.FromMinutes(5)); return(dtos); }
public void SetStoryId(Guid commandId, long storyId) => _storage.Set(GetKey(commandId), storyId);
public void Set(Guid commandId, AuthDto token) => _storage.Set(GetKey(commandId), token);