public MoviesController(IMovieRepository movieRepository, IGenreRepository genreRepository, IMaturityRepository maturityRepository, IMapper mapper) { _movieRepository = movieRepository; _genreRepository = genreRepository; _maturityRepository = maturityRepository; _mapper = mapper; }
public GameRepository() : base() { genreRepo = new GenreRepository(context); mediaRepo = new MediaRepository(context); platformRepo = new PlatformRepository(context); }
public HomeController(ILogger <HomeController> logger, IActorRepository actor, IUserRepository customer, IMovieRepository movie, IPast_PurchasesRepository past_purchase, IPurchaseRepository purchase, IRentalRepository rental, IReviewRepository review, ITransactionRepository transaction, IAge_RatingRepository age_rating, IDirectorRepository director, IGenreRepository genre, ICartRepository cart, ITransactionDetailsRepository transactionDetails, AppDbContext context ) { _logger = logger; _actorList = actor; _customerList = customer; _movieList = movie; _past_purchaseList = past_purchase; _purchaseList = purchase; _rentalList = rental; _reviewList = review; _transactionList = transaction; _age_RatingList = age_rating; _directorList = director; _genreList = genre; _cartList = cart; _transactionDetailsList = transactionDetails; _context = context; }
public GenreDomainService(IGenreRepository genreRepository, IUnitOfWork unitOfWork, ICheckFile checkFile) { this.genreRepository = genreRepository; this.unitOfWork = unitOfWork; this.checkFile = checkFile; }
public GameRepository(ZanyContext ctx) : base(ctx) { genreRepo = new GenreRepository(ctx); mediaRepo = new MediaRepository(ctx); platformRepo = new PlatformRepository(ctx); }
public MovieController(IMovieRepository movieRepo, IGenreRepository genreRepo, IExternalMovieDatabase external) { _movieRepository = movieRepo; _genreRepository = genreRepo; _externalDB = external; _uploadService = new FileUpload(); }
public GenreAppService( IGenreRepository genreRepository, IUnitOfWorkManager unitOfWorkManager) : base(unitOfWorkManager) { this._genreRepository = genreRepository; }
public ChinookSupervisor(IAlbumRepository albumRepository, IArtistRepository artistRepository, ICustomerRepository customerRepository, IEmployeeRepository employeeRepository, IGenreRepository genreRepository, IInvoiceLineRepository invoiceLineRepository, IInvoiceRepository invoiceRepository, IMediaTypeRepository mediaTypeRepository, IPlaylistRepository playlistRepository, ITrackRepository trackRepository, IMemoryCache memoryCache ) { _albumRepository = albumRepository; _artistRepository = artistRepository; _customerRepository = customerRepository; _employeeRepository = employeeRepository; _genreRepository = genreRepository; _invoiceLineRepository = invoiceLineRepository; _invoiceRepository = invoiceRepository; _mediaTypeRepository = mediaTypeRepository; _playlistRepository = playlistRepository; _trackRepository = trackRepository; _cache = memoryCache; }
public HomeController(IPageRepository pageRepo, IGenreRepository genreRepo, IMediumRepository mediumRepo, IArtistRepository artistRepo) { this._pageRepo = pageRepo; this._genreRepo = genreRepo; this._mediumRepo = mediumRepo; this._artistRepo = artistRepo; }
public GenreController() { string cnn = ConfigurationManager.ConnectionStrings["CinemaCnn"].ToString(); var dbContext = new DatabaseContext(cnn); var genreRepo = new GenreRepository(dbContext); _genreRepository = genreRepo; }
public static void SeedGenres(IGenreRepository genrerepo) { using (FileStream fs = File.Open("DataInit\\genres.csv", FileMode.Open, FileAccess.Read, FileShare.None)) { var parser = new Microsoft.VisualBasic.FileIO.TextFieldParser(fs); parser.TextFieldType = Microsoft.VisualBasic.FileIO.FieldType.Delimited; parser.SetDelimiters(new string[] { "," }); //genrerepo.Clear(); genrerepo.SetIdentityInsert(true); bool first = true; while (!parser.EndOfData) { // 0: genreId, 1: genre string[] row = parser.ReadFields(); if (first) { first = false; continue; } var genre = new Genre { //GenreId = Int32.Parse(row[0]), Name = row[1] }; genrerepo.Create(genre); } genrerepo.SetIdentityInsert(false); } }
public Genre Get(int genreId) { IGenreRepository genreRepository = _repositoryFactory.GetDataRepository <IGenreRepository>(); Genre genre = genreRepository.Get(genreId); return(genre); }
public HomeController( IMovieRepository movieRepository, IGenreRepository genreRepository) { _movieRepository = movieRepository; _genreRepository = genreRepository; }
//private MusicStoreEntities db = new MusicStoreEntities(); public StoreManagerController(IUnitOfWork unitOfWork, IGenreRepository genres, IAlbumsRepository albums, IArtistRepository artists) { _unitOfWork = unitOfWork; _genres = genres; _albums = albums; _artists = artists; }
//private readonly ILog _log; public StoreController(IGenreRepository genres, IAlbumsRepository albums, ILogProvider log) { _genres = genres; _albums = albums; _log = log; //_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); }
/// <summary> /// Preencho o repositório com as HQs novas /// </summary> public void Dump(IComicRepository comicRepository, IAuthorRepository authorRepository, IGenreRepository genreRepository, IPublisherRepository publisherRepository, ILogRepository logRepository) { //Se já processei nesse período, retorno DateTime lastSyncDate = logRepository.GetLastComicListUpdate(); if (lastSyncDate.AddHours(24) > DateTime.Now) return; //Espero terminar de processar while (_working) Thread.Sleep(10); //Busco todas as HQs do banco IList<Comic> repoList = comicRepository.Read(); //Comparo o que mudou foreach (ComicVisitor cacheComic in _cache) { if (repoList.Any(c => c.ComicName.ToUpper().Equals(cacheComic.ComicName.ToUpper()))) continue; //Se tem uma HQ nova, adiciono Comic dbComic = ComicVisitor.ToComic(cacheComic); comicRepository.Add(dbComic); cacheComic.ComicId = dbComic.ComicId; } comicRepository.Save(); logRepository.SetLastComicListUpdate(DateTime.Now); }
public MovieMessageController( IMovieRepository movieRepository, IGenreRepository genreRepository) { _movieRepository = movieRepository; _genreRepository = genreRepository; }
public UnitOfWork(ApplicationDbContext context) { _context = context; Gigs = new GigRepository(context); Attendance = new AttendanceRepository(context); Genre = new GenreRepository(context); }
public MusicLibraryService(IArtistRepository artists, IAlbumRepository albums, ISongRepository songs, IGenreRepository genres) { Artists = artists; Albums = albums; Songs = songs; Genres = genres; }
private async Task InitGenres(IGenreRepository genreRepository) { int genresCount = await genreRepository.GetCount(); if (genresCount != 0) { return; } var genres = new List <Genre> { new Genre { Title = "Prose" }, new Genre { Title = "Novel" }, new Genre { Title = "Story" }, new Genre { Title = "Verse" }, }; await genreRepository.AddRangeAsync(genres); }
public SearchService(ISongRepository songRepository, IAlbumRepository albumRepository, IArtistRepository artistRepository, IGenreRepository genreRepository) { _songRepository = songRepository; _albumRepository = albumRepository; _artistRepository = artistRepository; _genreRepository = genreRepository; }
public GenreController(AmidusDbContext context, IMapper mapper, IGenreRepository repository, IUnitOfWork unitOfWork) { this.mapper = mapper; this.context = context; this.repository = repository; this.unitOfWork = unitOfWork; }
public ApiController(ICountryRepository countryRepository, IArtistRepository artistRepository, IRecordRepository recordRepository, IGenreRepository genreRepository) { this.countryRepository = countryRepository; this.artistRepository = artistRepository; this.recordRepository = recordRepository; this.genreRepository = genreRepository; }
public CategoryController( IGenreRepository genreRepository, IWebHostEnvironment webHostEnvironment) { this.webHostEnvironment = webHostEnvironment; this.genreRepository = genreRepository; }
public MetadataService(ICacheService cacheService, IPlaybackService playbackService, ITrackRepository trackRepository, ITrackStatisticRepository trackStatisticRepository, IAlbumRepository albumRepository, IGenreRepository genreRepository, IArtistRepository artistRepository, IFileMetadataFactory metadataFactory) { this.cacheService = cacheService; this.playbackService = playbackService; this.trackStatisticRepository = trackStatisticRepository; this.trackRepository = trackRepository; this.albumRepository = albumRepository; this.genreRepository = genreRepository; this.artistRepository = artistRepository; this.metadataFactory = metadataFactory; this.fileMetadataDictionary = new Dictionary <string, IFileMetadata>(); this.updateFileMetadataTimer = new Timer(); this.updateFileMetadataTimer.Interval = this.updateFileMetadataLongTimeout; this.updateFileMetadataTimer.Elapsed += async(_, __) => await this.UpdateFileMetadataAsync(); this.playbackService.PlaybackStopped += async(_, __) => await this.UpdateFileMetadataAsync(); this.playbackService.PlaybackFailed += async(_, __) => await this.UpdateFileMetadataAsync(); this.playbackService.PlaybackSuccess += async(_, __) => await this.UpdateFileMetadataAsync(); }
/// <summary> /// The default constructor. /// </summary> /// <param name="genreRepository">A container for genre information.</param> public GenreController(IGenreRepository genreRepository) { if (genreRepository == null) throw new ArgumentNullException("genreRepository"); _genreRepository = genreRepository; }
public ContentServiceModel(IContentRepository ContentRepository, IGenreRepository GenreRepository, IAwsVideoRepository AwsVideoRepository, IPersonRepository PersonRepository) { _ContentRepository = ContentRepository; _GenreRepository = GenreRepository; _PersonRepository = PersonRepository; _AwsVideoRepository = AwsVideoRepository; }
public UserRepository(UserManager <ApplicationUserDbo> userManager, AppDbContext appDbContext, IVenueRepository venueRepository, IGenreRepository genreRepository) { this.userManager = userManager; this.appDbContext = appDbContext; this.venueRepository = venueRepository; this.genreRepository = genreRepository; }
public GenreFormHandler(IEntityRepository <IVideogameEntity> entityRepository, IGenreRepository genreRepository, IGenreFactory genreFactory) { this.entityRepository = entityRepository; this.genreRepository = genreRepository; this.genreFactory = genreFactory; }
//private MusicStoreEntities db = new MusicStoreEntities(); public StoreManagerController(IUnitOfWork unitOfWork, IGenreRepository genres, IAlbumsRepository albums, IArtistRepository artists) { _unitOfWork = unitOfWork; _genres = genres; _albums = albums; _artists = artists; }
/// <summary> /// Initialises a new instance of the <see cref="MovieServiceDependencies" /> class. /// </summary> /// <param name="movieRepository">The movie repository.</param> /// <param name="genreRepository">The genre repository.</param> /// <param name="genreLinkRepository">The genre link repository.</param> /// <param name="movieApi">The movie API.</param> public MovieServiceDependencies(IMovieRepository movieRepository, IGenreRepository genreRepository, IMovieGenreLinkRepository genreLinkRepository, MovieApi movieApi) { MovieRepository = movieRepository; GenreRepository = genreRepository; GenreLinkRepository = genreLinkRepository; MovieApi = movieApi; }
public CollectionRepository(IConfiguration configuration, IAlbumRepository albumRepo, IGenreRepository genreRepo, IStyleRepository styleRepo) { _connectionString = configuration.GetValue <string>("ConnectionString"); _albumRepo = albumRepo; _genreRepo = genreRepo; _styleRepo = styleRepo; }
public static void SeedData( RoleManager <IdentityRole> roleManager, UserManager <ApplicationUser> userManager, DatabaseContext dbContext, IMovieService movieService, IGenreRepository genreRepository, IGenreService genreService) { SeedRoles(roleManager); SeedUsers(userManager); // Example from SamBioin's Website - Not scraped SeedDatabase_CinemasAndLocations(dbContext); // Scraped from IMDB SeedDatabase_Genres(dbContext, genreService); // Generated by me SeedDatabase_TheatreHalls(dbContext); // Scraped from IMDB SeedDatabase_Movies(dbContext, movieService, genreRepository); /* This will be commented after one run */ // Random Generated //SeedDatabase_MovieShowtimes(dbContext); }
public HomeController() { this._pageRepo = new EFPageRepository(); this._genreRepo = new EFGenreRepository(); this._mediumRepo = new EFMediumRepository(); this._artistRepo = new EFArtistRepository(); }
public GenreService(IGenreRepository genreRepository, IItemRepository itemRepository, IGenreMapper genreMapper, IItemMapper itemMapper) { _genreRepository = genreRepository; _itemRepository = itemRepository; _genreMapper = genreMapper; _itemMapper = itemMapper; }
public GenreAppService(IUnitOfWork unitOfWork, IGenreRepository genreRepository, IGenreService genreService) { _notifications = DomainEvent.Container.GetService <IHandler <DomainNotification> >(); _unitOfWork = unitOfWork; _genreRepository = genreRepository; _genreService = genreService; }
public BlazorSupervisor(IAlbumRepository albumRepository, IArtistRepository artistRepository, ICustomerRepository customerRepository, IEmployeeRepository employeeRepository, IGenreRepository genreRepository, IInvoiceLineRepository invoiceLineRepository, IInvoiceRepository invoiceRepository, IMediaTypeRepository mediaTypeRepository, IPlaylistRepository playlistRepository, ITrackRepository trackRepository, IMemoryCache memoryCache, IWeatherForecastRepository weatherForecastRepository, IVendaRepository vendaRepository ) { _albumRepository = albumRepository; _artistRepository = artistRepository; _customerRepository = customerRepository; _employeeRepository = employeeRepository; _genreRepository = genreRepository; _invoiceLineRepository = invoiceLineRepository; _invoiceRepository = invoiceRepository; _mediaTypeRepository = mediaTypeRepository; _playlistRepository = playlistRepository; _trackRepository = trackRepository; _cache = memoryCache; _weatherForecastRepository = weatherForecastRepository; _vendaRepository = vendaRepository; }
public IndexingService(ISQLiteConnectionFactory factory, ICacheService cacheService, ITrackRepository trackRepository, IAlbumRepository albumRepository, IGenreRepository genreRepository, IArtistRepository artistRepository, IFolderRepository folderRepository) { // Initialize services // ------------------- this.cacheService = cacheService; // Initialize factory // ------------------ this.factory = factory; // Initialize repositories // ----------------------- this.trackRepository = trackRepository; this.albumRepository = albumRepository; this.genreRepository = genreRepository; this.artistRepository = artistRepository; this.folderRepository = folderRepository; // Initialize values // ----------------- this.needsIndexing = true; this.isIndexing = false; // Initialize watchers this.InitializeCollectionFolderWatchersAsync(); }
public ProductController(IGameConsoleRepository gameConsoleRepository, IGameRepository gameRepository, IProductRepository productRepository, IGenreRepository genreRepository) { _gameConsoleRepository = gameConsoleRepository; _gameRepository = gameRepository; _productRepository = productRepository; _genreRepository = genreRepository; }
public UnitOfWork() { context = new VideoAppContext(); context.Database.EnsureCreated(); VideoRepository = new VideoRepositoryEFMemory(context); GenreRepository = new GenreRepo(context); }
public AlbumService(IAlbumRepository albumRepository, IArtistRepository artistRepository, IGenreRepository genreRepository, IUnitOfWork uow) { _albumRepository = albumRepository; _artistRepository = artistRepository; _genreRepository = genreRepository; _uow = uow; }
public BookOrchestration(IBookRepository bookRepository, IAuthorRepository authorRepository, IGenreRepository genreRepository) { _bookRepository = bookRepository; _authorRepository = authorRepository; _genreRepository = genreRepository; }
public MovieService(IMovieRepository movieRepository, ITheaterRepository theaterRepository, IGenreRepository genreRepository, ITimeIntervalRepository timeIntervalRepository) { _movieRepository = movieRepository; _theaterRepository = theaterRepository; _genreRepository = genreRepository; _timeIntervalRepository = timeIntervalRepository; }
public ProductService(IGenreRepository genreRepository, IPictureService pictureService, IPictureRepository pictureRepository, IArtistRepository artistRepository, IAlbumRepository albumRepository, IPurchaseRepository purchaseRepository) { this.GenreRepository = genreRepository; this.PictureRepository = pictureRepository; this.PictureService = pictureService; this.ArtistRepository = artistRepository; this.AlbumRepository = albumRepository; this.PurchaseRepository = purchaseRepository; }
public FavoriteRepository(IDatabase database, IAlbumArtistRepository albumArtistRepository, IAlbumRepository albumRepository, IArtistRepository artistRepository, IFolderRepository folderRepository, IGenreRepository genreRepository, IPlaylistRepository playlistRepository, ISongRepository songRepository, IVideoRepository videoRepository, IItemRepository itemRepository) { if (database == null) { throw new ArgumentNullException("database"); } if (albumRepository == null) { throw new ArgumentNullException("albumRepository"); } if (albumArtistRepository == null) { throw new ArgumentNullException("albumArtistRepository"); } if (artistRepository == null) { throw new ArgumentNullException("artistRepository"); } if (folderRepository == null) { throw new ArgumentNullException("folderRepository"); } if (genreRepository == null) { throw new ArgumentNullException("genreRepository"); } if (playlistRepository == null) { throw new ArgumentNullException("playlistRepository"); } if (songRepository == null) { throw new ArgumentNullException("songRepository"); } if (videoRepository == null) { throw new ArgumentNullException("videoRepository"); } if (itemRepository == null) { throw new ArgumentNullException("itemRepository"); } this.database = database; this.albumArtistRepository = albumArtistRepository; this.albumRepository = albumRepository; this.artistRepository = artistRepository; this.folderRepository = folderRepository; this.genreRepository = genreRepository; this.playlistRepository = playlistRepository; this.songRepository = songRepository; this.videoRepository = videoRepository; this.itemRepository = itemRepository; }
public ComicController() { DbContext sharedContext = new Data.ComiczillaDb(); _repository = new ComicRepository(sharedContext); _authorRepository = new AuthorRepository(sharedContext); _genreRepository = new GenreRepository(sharedContext); _publisherRepository = new PublisherRepository(sharedContext); _chapterRepository = new ChapterRepository(sharedContext); _logRepository = new LogRepository(sharedContext); }
public ComicController(IComicRepository repository, IAuthorRepository authorRepository, IGenreRepository genreRepository, IPublisherRepository publisherRepository, IChapterRepository chapterRepository, ILogRepository logRepository) { _repository = repository; _authorRepository = authorRepository; _genreRepository = genreRepository; _publisherRepository = publisherRepository; _chapterRepository = chapterRepository; _logRepository = logRepository; }
/// <summary> /// The default constructor. /// </summary> /// <param name="configuration">The configuration for the application.</param> /// <param name="personRepository">A container for person information.</param> /// <param name="genreRepository">A container for genre information.</param> public RemoteMovieRepository(IConfigurationProvider configuration, IPersonRepository personRepository, IGenreRepository genreRepository) { if (configuration == null) throw new ArgumentNullException("configuration"); if (personRepository == null) throw new ArgumentNullException("personRepository"); if (genreRepository == null) throw new ArgumentNullException("genreRepository"); _apiKey = configuration.MovieDBAPIKey; _personRepository = personRepository; _genreRepository = genreRepository; }
public GenresController ( IGenreRepository genreRepository, ISongRepository songRepository, IValidationRules validationRules, IAccount account) { _genreRepository = genreRepository; _songRepository = songRepository; _validationRules = validationRules; var currentUserName = GetCurrentSessionUser(); if (currentUserName.Length > 0) _currentUser = account.GetUserByUserName(currentUserName); _common = new CommonSong(account, currentUserName); }
/// <summary> /// ctor: Initialise the AlbumModelDataService /// </summary> /// <param name="AlbumRepository">Instance of the AlbumRepository</param> /// <param name="ArtistRepository">Instance of the ArtistRepository</param> /// <param name="GenreRepository">Instance of the GenreRepository</param> /// <param name="PlaylistRepository">Instance of the PlaylistRepository</param> public AlbumModelDataService(IAlbumRepository AlbumRepository, IArtistRepository ArtistRepository, IGenreRepository GenreRepository, IPlaylistRepository PlaylistRepository) { if (AlbumRepository == null) throw new ArgumentNullException("AlbumRepository", "No valid Repository supplied"); _albumRepository = AlbumRepository; if (ArtistRepository == null) throw new ArgumentNullException("ArtistRepository", "No valid Repository supplied"); _artistRepository = ArtistRepository; if (GenreRepository == null) throw new ArgumentNullException("GenreRepository", "No valid Repository supplied"); _genreRepository = GenreRepository; if (PlaylistRepository == null) throw new ArgumentNullException("PlaylistRepository", "No valid Repository supplied"); _playlistRepository = PlaylistRepository; }
public GenreController(IGenreRepository genreRepository) { this.genreRepository = genreRepository; }
public void Setup() { SessionProvider.CurrentSession = InMemorySession; _sut = new GenreRepository(); }
public MovieService(IMovieRepository movieRepository, IGenreRepository genreRepository, IUnitOfWork uow) { _movieRepository = movieRepository; _genreRepository = genreRepository; _uow = uow; }
public GenreController(IGenreRepository genreRepository, IUnitOfWork unitOfWork) { _genreRepository = genreRepository; _unitOfWork = unitOfWork; }
public GenreController(IGenreRepository repository) { Repository = repository; }
public AlbumService(IAlbumRepository albumRepository, IArtistRepository artistRepository, IGenreRepository genreRepository) { _albumRepository = albumRepository; _artistRepository = artistRepository; _genreRepository = genreRepository; }
//deka kje raboti so entitetot od zharn public GenreService(IGenreRepository genreRepository) { _genreRepository = genreRepository; }
public GenreRestfulViewModule(IGenreRepository repository) : base("/genres") { Get["/"] = _ => { var allGenres = repository.GetAll(); dynamic model = new ExpandoObject(); model.HasGenres = allGenres.Any(); model.Genres = allGenres; //return View["genres/all", model]; return Negotiate .WithView("genres/all") .WithModel((object) model) .WithMediaRangeModel("application/json", allGenres) .WithMediaRangeModel("application/xml", allGenres); }; Get["/search"] = _ => { dynamic name = this.Request.Query.name; IList<Genre> foundGenres = null; if (name.HasValue && ((string)name).Trim() != "") { foundGenres = repository.GetByName(name); } else { foundGenres = repository.GetAll(); } dynamic model = new ExpandoObject(); model.HasGenres = foundGenres.Any(); model.Genres = foundGenres; //return View["genres/search", model]; return Negotiate .WithView("genres/search") .WithModel((object)model) .WithMediaRangeModel("application/json", foundGenres) .WithMediaRangeModel("application/xml", foundGenres); }; Get["/addGenre"] = _ => { dynamic model = new ExpandoObject(); model.HasMessage = false; AddGenresToModel(model, repository.GetAll()); return View["genres/addGenre", model]; }; Post["/"] = _ => { Genre postedGenre = this.Bind<Genre>(); Logger.Debug(string.Format("[{0}] postedGenre was {1}", this.Request.Url, postedGenre)); var newGenreId = repository.Save(postedGenre); dynamic model = new ExpandoObject(); if (newGenreId == null) { model.HasMessage = true; model.Message = "Genre was not saved"; model.MessageStyle = "color:red;"; } else { model.HasMessage = true; model.Message = "Genre was saved with Id " + newGenreId; model.MessageStyle = ""; } var currentGenres = repository.GetAll(); AddGenresToModel(model, currentGenres); //return View["genres/addGenre", model]; return Negotiate .WithView("genres/addGenre") .WithModel((object)model) .WithHeader("Location", "genres/" + newGenreId) .WithMediaRangeModel("application/json", new { }) .WithMediaRangeModel("application/xml", new { }); }; }
public StoreService(IAlbumRepository albumRepository, IGenreRepository genreRepository) { _albumRepository = albumRepository; _genreRepository = genreRepository; }
public MoviesController(IGenreRepository genreRepository, IMovieRepository movieRepository) { _genreRepository = genreRepository; _movieRepository = movieRepository; }