public async Task <ThingAllViewModel> Handle(
            ThingQuery.GetAll message)
        {
            var entities = await _thingRepository.GetAllAsync();

#pragma warning disable 618
            return(new ThingAllViewModel(Mapper.Map <IEnumerable <ThingDetailViewModel> >(entities)));

#pragma warning restore 618
        }
Exemplo n.º 2
0
 // GET api/values
 public async Task <IEnumerable <Thing> > Get()
 {
     return(await _repository.GetAllAsync());
 }