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()))); }
public AllTracksByArtistIdQueryHandler(ITrackService service, AllTracksByArtistIdQuery query) { _service = service; _query = query; }
public IQueryHandler <AllTracksByArtistIdQuery, IEnumerable <Track> > Build(AllTracksByArtistIdQuery query) { return(new AllTracksByArtistIdQueryHandler(_service, query)); }