public async Task <IEnumerable <RssSourceModel> > Handle(GetAllRssSourseQuery request, CancellationToken cancellationToken) { var res = await _dbContext.RssSource .Select(sourse => _mapper.Map <RssSourceModel>(sourse)) .ToListAsync(cancellationToken); return(res); }
public async Task <IEnumerable <RssSourceModel> > GetAllRssSourceAsync(bool trackChanges) { var rssSourseQuery = new GetAllRssSourseQuery(); try { return(await _mediator.Send(rssSourseQuery)); } catch (Exception ex) { Log.Error(ex.Message); throw; } }