public LiveStreamService(IRepository <Models.LiveStream> repository, IValidationProvider validationProvider, ICloudStorage cloudStorage, IDirble dirble) : base(repository, validationProvider, cloudStorage) { _repository = repository; _dirble = dirble; }
public static async Task <IWebHost> SeedData(this IWebHost webHost) { using (var scope = webHost.Services.GetService <IServiceScopeFactory>().CreateScope()) { using (var context = scope.ServiceProvider.GetRequiredService <ApplicationDbContext>()) { _env = scope.ServiceProvider.GetRequiredService <IHostingEnvironment>(); _configuration = scope.ServiceProvider.GetRequiredService <IConfiguration>(); _cloudStorage = scope.ServiceProvider.GetRequiredService <ICloudStorage>(); _audioService = scope.ServiceProvider.GetRequiredService <IAudioService <Audio> >(); _uploadService = scope.ServiceProvider.GetRequiredService <IUploadService>(); _genreService = scope.ServiceProvider.GetRequiredService <IGenreService>(); _liveStreamService = scope.ServiceProvider.GetRequiredService <ILiveStreamService>(); _dirble = scope.ServiceProvider.GetRequiredService <IDirble>(); context.Database.Migrate(); var musicGenres = MusicGenres.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true).OfType <DictionaryEntry>().ToArray(); var otherGenres = OtherGenres.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true).OfType <DictionaryEntry>().ToArray(); await SeedImages(); // await SeedGenres(context); // await SeedLiveStreams(); SeedQuotes(context); _genreService.UpdateCoverImages(); LuceneSearch.AddOrUpdateLuceneIndex(_audioService.GetAudios()); context.SaveChanges(); } } return(webHost); }
public DirbleController(IDirble dirble, ILiveStreamService liveStreamService) { _dirble = dirble; _liveStreamService = liveStreamService; }
public DirbleController(IDirble dirble) { _dirble = dirble; }