public async Task <ActionResult <IEnumerable <GetEntriesResponse> > > GetEntries() { var query = new GetEntriesRequest(); var result = await _mediator.Send(query); return(Ok(result)); }
public QueueEntry[] GetMyEntries(string name) { GetEntriesRequest request = new GetEntriesRequest(); request.AssignedTo = name; return(Translator.Translate <QueueEntry[]>(_customerQueueServiceProxy.GetEntries(request))); }
public IList <HostEntry> GetEntries() { var request = new GetEntriesRequest(); PropertyBag responseBag = (PropertyBag)base.Invoke("GetEntries", new object[] { request.ToPropertyBag() }); var response = new GetEntriesResponse(responseBag); return(response.Entries); }
public async Task <IEnumerable <GetEntriesResponse> > Handle(GetEntriesRequest request, CancellationToken cancellationToken) { var entries = await _dbContext.Entries .Include(entry => entry.Photos) .ThenInclude(photo => photo.Camera) .Include(entry => entry.Photos) .ThenInclude(photo => photo.Film) .ToListAsync(); return(_mapper.Map <IEnumerable <GetEntriesResponse> >(entries)); }
public async Task <bool> Handle(GetEntriesRequest message, IOutputPort <GetEntriesResponse> outputPort) { Entry[] entries = null; try { await Task.Run(() => { entries = _Repo.List(message.Query).ToArray(); }); outputPort.Handle(new GetEntriesResponse(entries, true, null)); return(true); } catch (Exception ex) { outputPort.Handle(new GetEntriesResponse(null, false, ex.ToString())); return(false); } }