Esempio n. 1
0
        public async Task <IEnumerable <RecordViewModel> > Handle(GetRecordsQuery request, CancellationToken cancellationToken)
        {
            var entities = await _repository.GetRecords(request.IsFinished, request.UserId);

            var result = _mapper.Map <IEnumerable <Record>, IEnumerable <RecordViewModel> >(entities);

            return(result);
        }
Esempio n. 2
0
 public HomeController(IRecordsRepository topListRepository)
 {
     _topRecordsRepository = topListRepository;
     TopRecordsList        = _topRecordsRepository.GetRecords();
 }