public async Task <TracksSource> Source(string tempo, string genres, [FromServices] ITracksSourcesRepository sourcesRepository) { TracksSource src = await sourcesRepository.GetRandomTracksSource(new TracksCriteria(tempo, genres)); return(src == null ? new TracksSource { Id = -10000 } : src); }
public TracksProvider(ITracksSourcesRepository tracksSourceRepository, ITracksRepository tracksRepository, ICommonTracksGrabber grabber) { _tracksSourceRepository = tracksSourceRepository; _tracksRepository = tracksRepository; _grabber = grabber; }