コード例 #1
0
        public ActionResult <IEnumerable <TrackDTO> > GetAllTracksByArtist(int id)
        {
            var query   = new AllTracksByArtistIdQuery(id);
            var handler = _queryHandler.Build(query);

            return(Ok(_mapper.Map <IEnumerable <TrackDTO> >(handler.Get())));
        }
コード例 #2
0
 public AllTracksByArtistIdQueryHandler(ITrackService service, AllTracksByArtistIdQuery query)
 {
     _service = service;
     _query   = query;
 }
コード例 #3
0
 public IQueryHandler <AllTracksByArtistIdQuery, IEnumerable <Track> > Build(AllTracksByArtistIdQuery query)
 {
     return(new AllTracksByArtistIdQueryHandler(_service, query));
 }