public GenreController(IGenreService genreService) { HtmlHelper.ClientValidationEnabled = true; HtmlHelper.UnobtrusiveJavaScriptEnabled = true; this._genreService = genreService; }
public ProductServices(BookStoreDbContext context, IGenreService genreService, ISearchService searchService, IUserServices userServices) { this.context = context; _genreService = genreService; _searchService = searchService; _userServices = userServices; }
public BooksController(IBookService serv, ICommentService serv2, IGenreService serv3, IUserService serv4) { bookService = serv; commentService = serv2; genreService = serv3; userService = serv4; }
public ID3V1Service( IGenreService genreService, IMapper mapper) { this.genreService = genreService; this.mapper = mapper; }
public ChangeGenreViewModel(IMvxNavigationService navigationService, IUserDialogs userDialogs, IValidator validator, IGenreService genreService, IBottomNavigationViewModelService bottomNavigationViewModelService, ITopNavigationViewModelService topNavigationViewModelService) { _navigationService = navigationService; _topNavigationViewModelService = topNavigationViewModelService; _bottomNavigationViewModelService = bottomNavigationViewModelService; _userDialogs = userDialogs; _validationHelper = new ValidationHelper(validator, this, Errors.Value, (propertyName) => { FocusName.Value = propertyName; }); _genreService = genreService; ValidateNameCommand = new MvxCommand(() => _validationHelper.Validate(() => Name)); InitValidationCommand = new MvxCommand(() => { _validationHelper.ResetValidation(); }); ChangeCommand = new MvxCommand(() => { if (!IsTaskExecutedValueConverter.Convert(ChangeTask.Value)) { ChangeTask.Value = NotifyTaskCompletion.Create(AttemptChangeAsync); } }); }
/// <summary> /// Initialize a new instance of GenresMovieViewModel class /// </summary> /// <param name="userService">The user service</param> /// <param name="genreService">The genre service</param> public GenreViewModel(IUserService userService, IGenreService genreService) { UserService = userService; GenreService = genreService; CancellationLoadingGenres = new CancellationTokenSource(); RegisterMessages(); }
public ProductsController(IProductService productService, IGenreService genreService, IOrderService orderService, IHttpContextAccessor accessor) { _productService = productService; _genreService = genreService; _orderService = orderService; _accessor = accessor; }
public GenreController( IGenreService genreService, IMapper mapper) { _genreService = genreService; _mapper = mapper; }
public SongController(IMapper mapper, ISongService songService, IGenreService genreService, IArtistService artistService) { _mapper = mapper; _songService = songService; _genreService = genreService; _artistService = artistService; }
public GenreAppService(IUnitOfWork unitOfWork, IGenreRepository genreRepository, IGenreService genreService) { _notifications = DomainEvent.Container.GetService <IHandler <DomainNotification> >(); _unitOfWork = unitOfWork; _genreRepository = genreRepository; _genreService = genreService; }
/// <summary> /// Constructor /// </summary> /// <param name="applicationService">The application service</param> /// <param name="showService">The show service</param> /// <param name="userService">The user service</param> /// <param name="genreService">The genre service</param> public ShowPageViewModel(IApplicationService applicationService, IShowService showService, IUserService userService, IGenreService genreService) { _showService = showService; _userService = userService; _applicationService = applicationService; GenreViewModel = new GenreViewModel(userService, genreService); RegisterCommands(); RegisterMessages(); Search = new SearchShowViewModel(); DispatcherHelper.CheckBeginInvokeOnUI(async() => { Tabs.Add(new PopularShowTabViewModel(_applicationService, showService, userService)); Tabs.Add(new GreatestShowTabViewModel(_applicationService, showService, userService)); Tabs.Add(new RecentShowTabViewModel(_applicationService, showService, userService)); Tabs.Add(new FavoritesShowTabViewModel(_applicationService, showService, userService)); SelectedTab = Tabs.First(); SelectedShowsIndexMenuTab = 0; await GenreViewModel.LoadGenresAsync().ConfigureAwait(false); await Tabs.ToList().ParallelForEachAsync(async tab => { await tab.LoadShowsAsync().ConfigureAwait(false); }).ConfigureAwait(false); }); }
public LibraryController( IAddBookService addBookService, INotificationService notificationService, IAllAddedBooksService allAddedBooksServices, IGiveBookService giveBookService, IGivenBooksService givenBooksService, IUserService userService, IGenreService genreService, ITakenBooksService takenBooksService, UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, ILogger <LogoutModel> logger, IHostingEnvironment hostingEnvironment) { this.addBookService = addBookService; this.notificationService = notificationService; this.allAddedBooksServices = allAddedBooksServices; this.genreService = genreService; this.giveBookService = giveBookService; this.givenBooksService = givenBooksService; this.userService = userService; this.userManager = userManager; this.signInManager = signInManager; this.logger = logger; this.hostingEnvironment = hostingEnvironment; }
public AddBandPresenter(IAddBandView view, IGenreService genreService, ICountryService countryService, IBandService bandService) : base(view) { if (bandService == null) { throw new ArgumentNullException(nameof(bandService)); } if (countryService == null) { throw new ArgumentNullException(nameof(countryService)); } if (genreService == null) { throw new ArgumentNullException(nameof(genreService)); } this.genreService = genreService; this.countryService = countryService; this.bandService = bandService; this.View.NeedGenres += View_NeedGenres; this.View.NeedCountries += View_NeedCountries; this.View.RegisterBand += View_RegisterBand; }
public void TestMethod1() { var container = new UnityContainer(); DI.Startup.Configuration(container); IHandler <DomainNotification> notifications = DomainEvent.Container.GetService <IHandler <DomainNotification> >(); Genre genre = new Genre() { Id = 0, Description = "Axé" }; container.RegisterInstance <IGenreRepository>(this.MockGenreRepository); IGenreService genreService = container.Resolve <IGenreService>(); genreService.Save(genre); IEnumerable <Genre> genres = genreService.GetGenres(); if (notifications.HasNotifications()) { } else { } }
public StatsUserService( ApplicationDbContext context, IGenreService genreService) { this.context = context; this.genreService = genreService; }
public GenreController(IGenreService genreService, ILoggerFactory logger, ICacheManager cacheManager, UserManager <ApplicationUser> userManager, IRoadieSettings roadieSettings) : base(cacheManager, roadieSettings, userManager) { this.Logger = logger.CreateLogger("RoadieApi.Controllers.GenreController"); this.GenreService = genreService; }
public AddGameValidator(IGenreService genreService, IDeveloperStudioService developerStudioService, IPublisherService publisherService) { RuleFor(p => p.DeveloperStudioId) .GreaterThan(0) .MustAsync(async(d, developerStudioId, token) => await developerStudioService.IsExistAsync(developerStudioId, token)) .WithMessage(t => $"Developer studio with Id {t.DeveloperStudioId} doesn't exist"); RuleFor(p => p.GenreId) .GreaterThan(0) .MustAsync(async(g, genreId, token) => await genreService.IsExistAsync(genreId, token)) .WithMessage(t => $"Genre with Id {t.GenreId} doesn't exist"); RuleFor(p => p.PublisherId) .GreaterThan(0) .MustAsync(async(p, publisherId, token) => await publisherService.IsExistAsync(publisherId, token)) .WithMessage(t => $"Publisher with Id {t.PublisherId} doesn't exist"); RuleFor(p => p.GameDetails) .NotNull() .SetValidator(new GameDetailsValidator()); RuleForEach(p => p.Attachments) .SetValidator(new GameAttachmentValidator()); }
/// <summary> /// Ermittelt die Liste der Genres für den Movie und fügt diejenigen hinzu, deren Name noch nicht in der /// übergebenen Liste enthalten ist /// Es werden keine Genres entfernt /// Typische Anwednung: Bei Selektion eines Movie von einem Provider werden Genrenamen mitgeliefert, die /// dann dem Film hinzugefügt werden sollen /// </summary> /// <param name="movie">Film, dessen Genres erweitert werden sollem</param> /// <param name="genreNames">Namen der hinzuzufügenden Genres</param> /// <returns>Alle MovieGenres für den Film, also alte sowie neu hinzugefügte</returns> public async Task <ICollection <MovieGenre> > AddMovieGenres(Movie movie, IList <string> genreNames) { List <MovieGenre> movieGenres = new List <MovieGenre>(); IGenreService genreService = Resolver.Resolve <IGenreService>(); // Bestimmen der Genres, die dem Film neu zugeordnet werden müssen var existingGenres = movie.MovieGenres.Where(x => x.Movie == movie).Select(mg => mg.Genre); var existingGenreNames = existingGenres.Select(s => s.Name); var newGenreNames = (from genre in genreNames select genre).Except(from existingGenre in existingGenreNames select existingGenre); foreach (string genreName in newGenreNames) { // Genres anlegen, falls es noch nicht existiert Genre genre = await genreService.GetOrCreateGenre(genreName); MovieGenre movieGenre = MovieGenre.CreateNew <MovieGenre>(); movieGenre.Movie = movie; movieGenre.Genre = genre; movieGenres.Add(movieGenre); } // Auch die bereits vorhandenen, zugeordneten Genres zurückgeben, damit diese angezeigt werden movieGenres.AddRange(movie.MovieGenres); return(movieGenres); }
public MovieController(IGenreService genreService, IActorService actorService, IMovieService movieService, IMapper mapper) : base(mapper) { _genreService = genreService; _actorService = actorService; _movieService = movieService; }
public GenresApiController(IGenreService genreService, INewRelicTransactionManager newRelicTransactionManager, ILogFactory logFactory) { _genreService = genreService; _newRelicTransactionManager = newRelicTransactionManager; _logFactory = logFactory; }
public GenreController( IGenreService genreService, ILanguageService languageService) { _genreService = genreService; _languageService = languageService; }
public BooksController(IBookService serv, IAuthorService serv2, IGenreService serv3, IVoteService serv4) { bookService = serv; authorService = serv2; genreService = serv3; voteService = serv4; }
public BookController(IBookService bService, IAuthorService aService, ILanguageService lService, IGenreService gService) { _bookService = bService; _authorService = aService; _languageService = lService; _genreService = gService; }
public ImportXMLCommand(IBookService bookService, IGenreService genreService, IProducerService producerService, IStudioService studioService, IXMLParser xmlParser) { if (bookService == null) { throw new ArgumentNullException("Book service cannnot be null."); } if (genreService == null) { throw new ArgumentNullException("Genre service cannnot be null."); } if (producerService == null) { throw new ArgumentNullException("Studio service cannnot be null."); } if (studioService == null) { throw new ArgumentNullException("Studio service cannnot be null."); } if (xmlParser == null) { throw new ArgumentNullException("XML parser cannnot be null."); } this.bookService = bookService; this.genreService = genreService; this.producerService = producerService; this.studioService = studioService; this.xMLParser = xmlParser; }
public GenreController(IGenreService genreService, ILogger <GenreController> logger, ICacheManager cacheManager, UserManager <User> userManager, IRoadieSettings roadieSettings) : base(cacheManager, roadieSettings, userManager) { Logger = logger; GenreService = genreService; }
public GetGenreByIdQueryHandler( ILogger <GetGenreByIdQuery> logger, IGenreService service) : base(logger) { _service = service; }
public FanficController( IFanficService fanficService, IFanficTagsService fanficTagsService, IChapterService chapterService, IChapterRatingService chapterRatingService, ICommentService commentService, ICommentRatingService commentRatingService, IGenreService genreService, ITagService tagService, SignInManager <ApplicationUser> authManager, IUserService userService, IMapper mapper) { _fanficService = fanficService; _fanficTagsService = fanficTagsService; _chapterService = chapterService; _chapterRatingService = chapterRatingService; _commentService = commentService; _commentRatingService = commentRatingService; _genreService = genreService; _tagService = tagService; _userService = userService; _authenticationManager = authManager; _mapper = mapper; }
public LibraryAccountController( IBookService bookService, IMessageService messageService, IGenreService genreService, IAllBooksServices getAllBooks, SignInManager <ApplicationUser> signInManager, UserManager <ApplicationUser> userManager, IGiveBookService giveBookService, IUserService userService, IGivenBooksService givenBooksService, ILogger <LogoutModel> logger, ILibraryProfileService libraryProfileService, IStatsLibraryService statsLibraryService, IIndexLibraryService indexLibraryService, IHostingEnvironment hostingEnvironment, IProfileChakerService profilChekerService) { this.bookService = bookService; this.messageService = messageService; this.genreService = genreService; this.getAllBooks = getAllBooks; this.userManager = userManager; this.giveBookService = giveBookService; this.userService = userService; this.givenBooksService = givenBooksService; this.signInManager = signInManager; this.logger = logger; this.libraryProfileService = libraryProfileService; this.statsLibraryService = statsLibraryService; this.indexLibraryService = indexLibraryService; this.hostingEnvironment = hostingEnvironment; this.profilChekerService = profilChekerService; }
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 BooksController(IBookService bookService, IAuthorService authorService, IGenreService genreService, IMapper mapper) { _bookService = bookService; _authorService = authorService; _genreService = genreService; _mapper = mapper; }
public BookController(IBookService bookService, IAuthorService authorService, IGradeService gradeService, IGenreService genreService, IUserService userService) { this.bookService = bookService; this.authorService = authorService; this.gradeService = gradeService; this.genreService = genreService; this.userService = userService; }
public GenresController( IGenreService genreSvc ) { if (genreSvc == null) throw new ArgumentNullException("genreSvc"); _genreSvc = genreSvc; }
public StoryController( IStoryService storyService, IGenreService genreService, IIdentifierProvider identifierProvider, IChapterService chapterService, IStatisticsService statisticsService) { this.storyService = storyService; this.genreService = genreService; this.chapterService = chapterService; this.identifierProvider = identifierProvider; this.statisticsService = statisticsService; }
public MovieController(IMovieService movieService, ICountryService countryService, IGenreService genreService, IPeopleService peopleService, ICareerService careerService, IUserCommentService userCommentService, IRatingService ratingService) { _movieService = movieService; _countryService = countryService; _genreService = genreService; _peopleService = peopleService; _careerService = careerService; _userCommentService = userCommentService; _ratingService = ratingService; }
public GamesController(IGameService gameService, ILogger logger, IGenreService genreService, IPlarfotmTypeService platformTypeService, IPublisherService publisherService) { _gameService = gameService; _logger = logger; _genreService = genreService; _publisherService = publisherService; _plarfotmTypeService = platformTypeService; Mapper.CreateMap<CreateGameViewModel, GameDTO>() .ForMember(g => g.Genres, m => m.Ignore()) .ForMember(g => g.PlatformTypes, m => m.Ignore()) .ForMember(g => g.Publisher, m => m.Ignore()); Mapper.CreateMap<CreateGameViewModel, GameViewModel>() .ForMember(g => g.Genres, m => m.Ignore()) .ForMember(g => g.PlatformTypes, m => m.Ignore()) .ForMember(g => g.Publishers, m => m.Ignore()); Mapper.CreateMap<FilterViewModel, FilterDTO>() .ForMember(f => f.From, m => m.MapFrom(fvm => Convert.ToDecimal(fvm.From))) .ForMember(f => f.To, m => m.MapFrom(fvm => Convert.ToDecimal(fvm.To))); Mapper.CreateMap<GameDTO, GameDetailsViewModel>() .ForMember(g => g.Genres, m => m.MapFrom( gamedto => new MultiSelectList( gamedto.Genres.Select( genre => new SelectListItem() { Value = genre.GenreId.ToString(), Text = genre.Name })))) .ForMember(pt => pt.PlatformTypes, m => m.MapFrom( ptDto => new MultiSelectList( ptDto.PlatformTypes.Select( platformType => new SelectListItem() { Value = platformType.PlatformTypeId.ToString(), Text = platformType.Name })))) .ForMember(g => g.PublisherCompanyName, m => m.MapFrom(g => g.Publisher.CompanyName)); }
public AlbumsController( IGenreService genreSvc, IArtistService artistSvc, IAlbumService albumSvc ) { if (genreSvc == null) throw new ArgumentNullException("genreSvc"); if (artistSvc == null) throw new ArgumentNullException("artistSvc"); if (albumSvc == null) throw new ArgumentNullException("albumSvc"); _genreSvc = genreSvc; _artistSvc = artistSvc; _albumSvc = albumSvc; }
public GameController(IGameService gameService, ICommentService commentServise, ILogger logger, IGenreService genreService, IPlarfotmTypeService plarfotmTypeService) { _gameService = gameService; _commentService = commentServise; _logger = logger; _genreService = genreService; _plarfotmTypeService = plarfotmTypeService; Mapper.CreateMap<CommentDTO, CommentViewModel>() .ForMember( c => c.ParentComment, m => m.Ignore() ); Mapper.CreateMap<CommentViewModel, CommentDTO>(); Mapper.CreateMap<GameDTO, GameDetailsViewModel>() .ForMember(g => g.Genres, m => m.MapFrom( gamedto => new MultiSelectList( gamedto.Genres.Select( genre => new SelectListItem() { Value = genre.GenreId.ToString(), Text = genre.Name })))) .ForMember(pt => pt.PlatformTypes, m => m.MapFrom( ptDto => new MultiSelectList( ptDto.PlatformTypes.Select( platformType => new SelectListItem() { Value = platformType.PlatformTypeId.ToString(), Text = platformType.Name })))) .ForMember(g => g.PublisherCompanyName, m => m.MapFrom( g => g.Publisher.CompanyName )); }
public GenreAdminController(IGenreService genreService) { this.genreService = genreService; }
public GenreApiController(ILocalLogger logger, IGenreService genreService) { _logger = logger; _genreService = genreService; }
public MovieController(IMovieService movieService, IGenreService genreService, ICertificationService certificationService) { _movieService = movieService; _genreService = genreService; _certificationService = certificationService; }
public AlbumController(IAlbumService albumService, IArtistService artistService, IGenreService genreService) { _albumService = albumService; _artistService = artistService; _genreService = genreService; }
public SongController(ISongService songService, IGenreService genreService, IArtistService artistService) { this._artistService = artistService; this._songService = songService; this._genreService = genreService; }
public UnknownRecordController(IGenreService genreService) { this._genreService = genreService; }
public StoreController(IGenreService genreService) { _genreService = genreService; HtmlHelper.UnobtrusiveJavaScriptEnabled = true; }
//public GenreController() //{ //} public GenreController(IGenreService genreService) { _genreService = genreService; }
public GenreController(IGenreService service) { this._service = service; }