public UnitOfWork(ApplicationDbContext context) { _context = context; GigsRepository = new GigsRepository(_context); UserRepository = new UserRepository(_context); GenresRepository = new GenresRepository(_context); }
public GenresService(IGenresRepository genresRepository, ISaveRepository unitOfWork, IMemoryCache cache, ILogger <GenresService> logger) { this._genresRepository = genresRepository; this._unitOfWork = unitOfWork; this._cache = cache; this._logger = logger; }
public UnitOfWork(ApplicationDbContext context) { _context = context; Gigs = new GigRepository(_context); Attendaces = new AttendaceRepository(_context); Followings = new FollowingRepository(_context); Genres = new GenresRepository(_context); }
public BooksRepository(DBLibraryContext ctx, IGenresRepository genRepo, IAuthorsRepository authorsRepository, IBorrowRepository borrowR) { this.context = ctx; this.Books = ctx.Books; this.GenresRepository = genRepo; this.AuthorsRepository = authorsRepository; this.BorrowRepository = borrowR; }
public AddEditVideoGameViewModel(IVideoGamesRepository repo, IGenresRepository genresRepository, IMediaTypesRepository mediaTypesRepository, IPlatformsRepository platformsRepository) { _repo = repo; _genresRepository = genresRepository; _mediaTypesRepository = mediaTypesRepository; _platformsRepository = platformsRepository; CancelCommand = new RelayCommand(OnCancel); SaveCommand = new RelayCommand(OnSave, CanSave); }
//private readonly LibraryContext _context; // public UnitOfWork(ChurchDBContext context) public UnitOfWork(IBooksRepository booksRepository, IBooksHistoryRepository booksHistoryRepository, IGenresRepository genresRepository, IRolesRepository rolesRepository, IUsersRepository usersRepository, LibraryContext context) { context.Database.Migrate(); BooksRepo = booksRepository; BooksHistoryRepo = booksHistoryRepository; GenresRepo = genresRepository; RolesRepo = rolesRepository; UsersRepo = usersRepository; }
public DatabaseBuilder(IActorsRepository actorsRepository, IContentPathsRepository contentPathsRepository, IDirectorsRepository directorsRepository, IEpisodesRepository episodesRepository, IGenresRepository genresRepository, ISeasonsRepository seasonsRepository, ISeriesRepository seriesRepository, ISubtitlesRepository subtitlesRepository, IWritersRepository writersRepository, IMoviesRepository moviesRepository, OmdbApiHandler omdbApiHandler) { _actorsRepository = actorsRepository; _contentPathsRepository = contentPathsRepository; _directorsRepository = directorsRepository; _episodesRepository = episodesRepository; _genresRepository = genresRepository; _seasonsRepository = seasonsRepository; _seriesRepository = seriesRepository; _subtitlesRepository = subtitlesRepository; _writersRepository = writersRepository; _moviesRepository = moviesRepository; _omdbApiHandler = omdbApiHandler; }
public DataManager(ILoginsRepository logins, IAuthorsRepository authors, IGenresRepository genres, IDateRepository dates, IPlaysRepository plays,IOrdersRepository orders, IRepertoireRepository repertories, ICategoryRepository categories, ICategoriesInfoRepository categoriesInfo, ICourierInfoRepository courierInfo, PrimaryMembershipProvider provider, CustomRoleProvider roleProvider) { this.logins = logins; this.genres = genres; this.authors = authors; this.dates = dates; this.plays = plays; this.orders = orders; this.provider = provider; this.repertories = repertories; this.categories = categories; this.categoriesInfo = categoriesInfo; this.courierInfo = courierInfo; this.roleProvider = roleProvider; }
public OmdbApiHandler(IActorsRepository actorsRepository, IContentPathsRepository contentPathsRepository, IDirectorsRepository directorsRepository, IEpisodesRepository episodesRepository, IGenresRepository genresRepository, ISeasonsRepository seasonsRepository, ISeriesRepository seriesRepository, ISubtitlesRepository subtitlesRepository, IWritersRepository writersRepository, IMoviesRepository moviesRepository) { _actorsRepository = actorsRepository; _contentPathsRepository = contentPathsRepository; _directorsRepository = directorsRepository; _episodesRepository = episodesRepository; _genresRepository = genresRepository; _moviesRepository = moviesRepository; _seasonsRepository = seasonsRepository; _seriesRepository = seriesRepository; _subtitlesRepository = subtitlesRepository; _writersRepository = writersRepository; var image = new Bitmap(Properties.Resources.default_avatar); _defaultAvatar = new MemoryStream(); image.Save(_defaultAvatar, System.Drawing.Imaging.ImageFormat.Png); }
public WebtoonsService( IWebtoonsRepository webtoonsRepository, IEpisodesRepository episodesRepository, IGenresRepository genresRepository, IApplicationUserRepository applicationUserRepository, IWebtoonsSubscribersRepository webtoonsSubscribersRepository, IReviewsRepository reviewsRepository, IReviewsVotesRepository reviewsVotesRepository, IEpisodesLikesService episodesLikesService, IWebtoonsRatingsService webtoonsRatingsService, IEpisodesViewsService episodesViewsService) { this.webtoonsRepository = webtoonsRepository; this.episodesRepository = episodesRepository; this.genresRepository = genresRepository; this.applicationUserRepository = applicationUserRepository; this.webtoonsSubscribersRepository = webtoonsSubscribersRepository; this.reviewsRepository = reviewsRepository; this.reviewsVotesRepository = reviewsVotesRepository; this.episodesLikesService = episodesLikesService; this.webtoonsRatingsService = webtoonsRatingsService; this.episodesViewsService = episodesViewsService; }
public ConsoleBasedServerHandler(DatabaseBuilder databaseBuilder, IActorsRepository actorsRepository, IContentPathsRepository contentPathsRepository, IDirectorsRepository directorsRepository, IEpisodesRepository episodesRepository, IGenresRepository genresRepository, ISeasonsRepository seasonsRepository, ISeriesRepository seriesRepository, ISubtitlesRepository subtitlesRepository, IWritersRepository writersRepository, IMoviesRepository moviesRepository, FtpServer ftpServer) { _actorsRepository = actorsRepository; _contentPathsRepository = contentPathsRepository; _directorsRepository = directorsRepository; _episodesRepository = episodesRepository; _genresRepository = genresRepository; _moviesRepository = moviesRepository; _seasonsRepository = seasonsRepository; _seriesRepository = seriesRepository; _subtitlesRepository = subtitlesRepository; _writersRepository = writersRepository; _ftpServer = ftpServer; _databaseBuilder = databaseBuilder; CommandsDictionary = new Dictionary <string, Tuple <Action, string> > { { "help", new Tuple <Action, string>(PrintCommands, "Displays a list of all commands available.") }, { "exit", new Tuple <Action, string>(ExitServer, "Safely shuts down the server and exits the command console.") }, { "enableAutoStart", new Tuple <Action, string>(SetAutoStartOnLogin, "The server will start automatically when the user logs in.") }, { "disableAutoStart", new Tuple <Action, string>(DisableAutoStartOnLogin, "The server will no longer start automatically when the user logs in.") }, { "initServer", new Tuple <Action, string>(InitializaServer, "Manually start the server.") }, { "shutDownServer", new Tuple <Action, string>(ShutDownServer, "Manually stop the server.") }, { "restartServer", new Tuple <Action, string>(RestartServer, "Manually restart the server.") }, { "status", new Tuple <Action, string>(DisplayServerStatus, "Displays the server's status.") }, { "addToMoviesDirectories", new Tuple <Action, string>(AddToMoviesDirectories, "Adds specified directory to the movies directory list.") }, { "removeFromMoviesDirectories", new Tuple <Action, string>(RemoveFromMoviesDirectories, "Removes specified directory from the movies directory list.") }, { "listMoviesDirectories", new Tuple <Action, string>(ListMoviesDirectories, "Lists all known movies directories.") }, { "addAllOrNewMovies", new Tuple <Action, string>(AddAllOrNewMovies, "Scans all movies directories to find and add all or any missing movies to the database.") }, { "testImage", new Tuple <Action, string>(TestImage, "Copies the selected movie's poster to the current user's desktop.") } }; }
public ConsoleBasedServerHandler(DatabaseBuilder databaseBuilder, IActorsRepository actorsRepository, IContentPathsRepository contentPathsRepository, IDirectorsRepository directorsRepository, IEpisodesRepository episodesRepository, IGenresRepository genresRepository, ISeasonsRepository seasonsRepository, ISeriesRepository seriesRepository, ISubtitlesRepository subtitlesRepository, IWritersRepository writersRepository, IMoviesRepository moviesRepository, FtpServer ftpServer) { _actorsRepository = actorsRepository; _contentPathsRepository = contentPathsRepository; _directorsRepository = directorsRepository; _episodesRepository = episodesRepository; _genresRepository = genresRepository; _moviesRepository = moviesRepository; _seasonsRepository = seasonsRepository; _seriesRepository = seriesRepository; _subtitlesRepository = subtitlesRepository; _writersRepository = writersRepository; _ftpServer = ftpServer; _databaseBuilder = databaseBuilder; CommandsDictionary = new Dictionary<string, Tuple<Action, string>> { {"help", new Tuple<Action, string>(PrintCommands, "Displays a list of all commands available.")}, {"exit", new Tuple<Action, string>(ExitServer, "Safely shuts down the server and exits the command console.")}, {"enableAutoStart", new Tuple<Action, string>(SetAutoStartOnLogin, "The server will start automatically when the user logs in.")}, {"disableAutoStart", new Tuple<Action, string>(DisableAutoStartOnLogin, "The server will no longer start automatically when the user logs in.")}, {"initServer", new Tuple<Action, string>(InitializaServer, "Manually start the server.")}, {"shutDownServer", new Tuple<Action, string>(ShutDownServer, "Manually stop the server.")}, {"restartServer", new Tuple<Action, string>(RestartServer, "Manually restart the server.")}, {"status", new Tuple<Action, string>(DisplayServerStatus, "Displays the server's status.")}, {"addToMoviesDirectories", new Tuple<Action, string>(AddToMoviesDirectories, "Adds specified directory to the movies directory list.")}, {"removeFromMoviesDirectories", new Tuple<Action, string>(RemoveFromMoviesDirectories, "Removes specified directory from the movies directory list.")}, {"listMoviesDirectories", new Tuple<Action, string>(ListMoviesDirectories, "Lists all known movies directories.")}, {"addAllOrNewMovies", new Tuple<Action, string>(AddAllOrNewMovies, "Scans all movies directories to find and add all or any missing movies to the database.")}, {"testImage", new Tuple<Action, string>(TestImage, "Copies the selected movie's poster to the current user's desktop.")} }; }
public BookInventoryService(IBookInventoryRepository booksRepository, IBookRentalRepository rentalRepository, IGenresRepository genresRepository) { _inventoryRepository = booksRepository; _rentalRepository = rentalRepository; _genresRepository = genresRepository; }
public GenresController(IGenresRepository repository) { this.repository = repository; }
public NavigationMenuViewComponent(IGenresRepository rep) { repository = rep; }
public GenresController(IGenresRepository genresRepository, IMapper mapper) { _genresRepository = genresRepository; _mapper = mapper; }
public BookController(IBooksRepository booksRepository, IGenresRepository genresRepository) { _booksRepository = booksRepository; _genresRepository = genresRepository; }
public GenreService(IGenresRepository genresRepository) { _genresRepository = genresRepository; }
public GenresController(IGenresRepository genresRepository) { _genresRepository = genresRepository; }
public GenresService(IGenresRepository genresRepository, IMapper mapper) { _genresRepository = genresRepository; _mapper = mapper; }
public HomeController(IBooksRepository booksRepository, IGenresRepository genresRepository, int countElemOnPage = 5) { _genresRepository = genresRepository; _booksRepository = booksRepository; COUNT_ELEMS_ON_PAGE = countElemOnPage; }
public GenreController(IGenresRepository rep) { _rep = rep; }
public GenresController(IGenresRepository repo) { repository = repo; }
public async Task <IActionResult> GetBooksByFilter([FromServices] IGenresRepository genresRep, int page, string searchExpr = "") => Ok(await _booksRepository.GetBooksByFilter(searchExpr, (await genresRep.GetAllGenres()).ToList()));
/// <summary> /// Инициализирует экземпляр <see cref=BooksService"/> /// </summary> /// <param name="repository">Репозиторий</param> public GenresService(IGenresRepository repository) { _repository = repository; }
public GenresController(IGenresRepository genresRepository) { _genresService = new GenresService(genresRepository); }
public GenresService(IGenresRepository genresRepository) { this._genresRepository = genresRepository ?? throw new ArgumentNullException(nameof(genresRepository)); }
public GenreFetcher(IGenresRepository genresRepository) { this.GenresRepository = genresRepository; }
public GenresService(IGenresRepository genresRepository) { this.genresRepository = genresRepository; }