public CommentService(IUnitOfWork <RutrackerContext> unitOfWork, IDateService dateService) : base(unitOfWork) { _dateService = dateService; _torrentRepository = _unitOfWork.GetRepository <ITorrentRepository>(); _commentRepository = _unitOfWork.GetRepository <ICommentRepository>(); _likeRepository = _unitOfWork.GetRepository <ILikeRepository>(); }
public HomeController() { DbContextOptionsBuilder <DbContext> optionsBuilder = new DbContextOptionsBuilder <DbContext>(); optionsBuilder.UseSqlServer(@"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=TorrentCheckLocalDB;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"); torrentRepository = new TorrentRepository(new TorrentContext(optionsBuilder.Options)); logic = new HomeLogic(torrentRepository); }
public TorrentService( IUnitOfWork <RutrackerContext> unitOfWork, IDateService dateService, IStorageService storageService) : base(unitOfWork) { _dateService = dateService; _storageService = storageService; _torrentRepository = _unitOfWork.GetRepository <ITorrentRepository>(); _subcategoryRepository = _unitOfWork.GetRepository <ISubcategoryRepository>(); }
public FileService( IUnitOfWork <RutrackerContext> unitOfWork, IStorageService storageService, IOptions <FileOptions> fileOptions) : base(unitOfWork) { _storageService = storageService; _fileOptions = fileOptions.Value; _fileRepository = _unitOfWork.GetRepository <IFileRepository>(); _torrentRepository = _unitOfWork.GetRepository <ITorrentRepository>(); }
private void InitializeModel() { this.InitializeCommands(); this.LoadSettingsModel(); this._repository = this.Container.Resolve <ITorrentRepository>(new ParameterOverride("filepath", this.SettingsModel.RepositoryFile)); this._eventLog = this.Container.Resolve <IEventLog>(new ParameterOverride("filepath", this.SettingsModel.LogFile)); this.LoadModel(); this.SetupTimer(); this.SetupBackgroundWorker(); }
public MovieService( IActorRepository actorRepository, IGenreRepository genreRepository, IMovieRepository movieRepository, ITorrentRepository torrentRepository, IMapper mapper) { _actorRepository = actorRepository; _genreRepository = genreRepository; _movieRepository = movieRepository; _torrentRepository = torrentRepository; _mapper = mapper; }
private void InitializeModel() { this.InitializeCommands(); this.LoadSettingsModel(); this._repository = this.Container.Resolve<ITorrentRepository>(new ParameterOverride("filepath", this.SettingsModel.RepositoryFile)); this._eventLog = this.Container.Resolve<IEventLog>(new ParameterOverride("filepath", this.SettingsModel.LogFile)); this.LoadModel(); this.SetupTimer(); this.SetupBackgroundWorker(); }
public TorrentsController(ITorrentRepository torrentRepository) { this.TorrentRepository = torrentRepository; }
public TorrentRepositoryTests() { var context = MockInitializer.GetRutrackerContext(); _torrentRepository = new TorrentRepository(context); }
public HomeLogic(ITorrentRepository repository) { this.repository = repository; logicHTTP = new HomeLogicHTTP(); logicSQL = new HomeLogicSQL(); }