public MovieLogic(IMovieContext context, IRoomContext roomContext, IApiHelper apiHelper, IAiringMovieContext airingMovieContext)
 {
     _repo             = new MovieRepo(context, apiHelper);
     _roomLogic        = new RoomLogic(roomContext);
     _airingMovieLogic = new AiringMovieLogic(airingMovieContext, roomContext);
     _reviewLogic      = new ReviewLogic();
 }
Esempio n. 2
0
 public MovieLogic(IMovieContext movieContext, GenreLogic genreLogic, SearchLogic searchLogic,
                   PlaylistLogic playlistLogic, MediaLogic mediaLogic, RatingLogic ratingLogic)
 {
     _iMovieContext = movieContext;
     _genreLogic    = genreLogic;
     _searchLogic   = searchLogic;
     _playlistLogic = playlistLogic;
     _mediaLogic    = mediaLogic;
     _ratingLogic   = ratingLogic;
 }
Esempio n. 3
0
 public void Setup()
 {
     _iMovieContext    = new MovieMemoryContext();
     _iGenreContext    = new GenreMemoryContext();
     _iPlaylistContext = new PlaylistMemoryContext();
     _iMediaContext    = new MediaMemoryContext();
     _iRatingContext   = new RatingMemoryContext();
     _genreLogic       = new GenreLogic(_iGenreContext);
     _searchLogic      = new SearchLogic(_genreLogic);
     _playlistLogic    = new PlaylistLogic(_iPlaylistContext, _iMediaContext);
     _mediaLogic       = new MediaLogic(_iMediaContext);
     _ratingLogic      = new RatingLogic(_iRatingContext, _mediaLogic);
     _movieLogic       = new MovieLogic(_iMovieContext, _genreLogic, _searchLogic, _playlistLogic, _mediaLogic, _ratingLogic);
     _testGenre1       = new GenreModel("test1", 1);
 }
Esempio n. 4
0
 public CreditsService(IMovieContext db)
 {
     _db = db;
 }
 public FakeMovieRepository(IMovieContext context)
 {
     _context = context;
 }
Esempio n. 6
0
 public MovieLogic(IMovieContext context)
 {
     movieContext = context;
 }
 public MovieLoaderLogic(IMovieContext dats)
 {
     _dats = dats;
 }
Esempio n. 8
0
 public VoteService(IMovieContext db)
 {
     _db = db;
 }
Esempio n. 9
0
 public ActorRepository(IMovieContext context)
 {
     _context = context;
 }
Esempio n. 10
0
 public SearchDataService(IMovieContext db, ILogger <SearchDataService> logger)
 {
     _db     = db;
     _logger = logger;
 }
Esempio n. 11
0
 public FolderService(IMovieContext db)
 {
     _db = db;
 }
Esempio n. 12
0
 public MovieService(IMovieContext db)
 {
     this.db = db;
 }
 public MovieRepo(IMovieContext context, IApiHelper apiHelper)
 {
     _movieContext = context;
     _apiHelper    = apiHelper;
 }
Esempio n. 14
0
 public MovieListLogic(IMovieContext dats)
 {
     _dats = dats;
 }
Esempio n. 15
0
 public UserService(IMovieContext db, ILogger <UserService> logger)
 {
     _logger = logger;
     _db     = db;
 }
 public MovieComponents(IMovieContext movieContext)
 {
     this.movieContext = movieContext;
 }
Esempio n. 17
0
 public MovieService(IMovieContext db, IMapper mapper)
 {
     _mapper = mapper;
     _db     = db;
 }
Esempio n. 18
0
 public PeopleService(IMovieContext db, IMapper mapper)
 {
     _db     = db;
     _mapper = mapper;
 }
Esempio n. 19
0
 public GenreService(IMovieContext db)
 {
     _db = db;
 }
 public MovieRepository(IMovieContext dbContext)
 {
     _dbContext = dbContext;
 }
Esempio n. 21
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.Configure <CookiePolicyOptions>(options =>
            {
                // This lambda determines whether user consent for non-essential cookies is needed for a given request.
                options.CheckConsentNeeded    = context => true;
                options.MinimumSameSitePolicy = SameSiteMode.None;
            });

            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

            services.AddSingleton(Configuration);

            services.AddTransient <IMovieContext, MovieSQLContext>(m =>
            {
                string c = Configuration.GetConnectionString("DefaultConnection");
                return(new MovieSQLContext(c));
            });
            services.AddTransient <IGenreContext, GenreSQLContext>(g =>
            {
                string c = Configuration.GetConnectionString("DefaultConnection");
                return(new GenreSQLContext(c));
            });
            services.AddTransient <IUserContext, UserSQLContext>(u =>
            {
                string c = Configuration.GetConnectionString("DefaultConnection");
                return(new UserSQLContext(c));
            });
            services.AddTransient <IPlaylistContext, PlaylistSQLContext>(p =>
            {
                string c = Configuration.GetConnectionString("DefaultConnection");
                return(new PlaylistSQLContext(c));
            });
            services.AddTransient <IMediaContext, MediaSQLContext>(m =>
            {
                string c = Configuration.GetConnectionString("DefaultConnection");
                return(new MediaSQLContext(c));
            });
            services.AddTransient <IRatingContext, RatingSQLContext>(r =>
            {
                string c = Configuration.GetConnectionString("DefaultConnection");
                return(new RatingSQLContext(c));
            });

            services.AddTransient(m =>
            {
                IMovieContext mc = m.GetService <IMovieContext>();
                GenreLogic gl    = m.GetService <GenreLogic>();
                SearchLogic sl   = m.GetService <SearchLogic>();
                PlaylistLogic p  = m.GetService <PlaylistLogic>();
                MediaLogic me    = m.GetService <MediaLogic>();
                RatingLogic rl   = m.GetService <RatingLogic>();
                return(new MovieLogic(mc, gl, sl, p, me, rl));
            });

            services.AddTransient(g =>
            {
                IGenreContext gc = g.GetService <IGenreContext>();
                return(new GenreLogic(gc));
            });

            services.AddTransient(s =>
            {
                GenreLogic gl = s.GetService <GenreLogic>();
                return(new SearchLogic(gl));
            });

            services.AddTransient(s =>
            {
                IUserContext uc  = s.GetService <IUserContext>();
                PlaylistLogic pl = s.GetService <PlaylistLogic>();
                RatingLogic rl   = s.GetService <RatingLogic>();
                return(new UserLogic(uc, pl, rl));
            });

            services.AddTransient(p =>
            {
                IPlaylistContext pl = p.GetService <IPlaylistContext>();
                IMediaContext m     = p.GetService <IMediaContext>();
                return(new PlaylistLogic(pl, m));
            });

            services.AddTransient(me =>
            {
                IMediaContext m = me.GetService <IMediaContext>();
                return(new MediaLogic(m));
            });

            services.AddTransient(r =>
            {
                IRatingContext rc = r.GetService <IRatingContext>();
                MediaLogic m      = r.GetService <MediaLogic>();
                return(new RatingLogic(rc, m));
            });



            services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
            .AddCookie(options =>
            {
                options.LoginPath = "/User/Login";
            });

            services.AddAuthorization(options =>
            {
                options.AddPolicy("Admin", p => p.RequireAuthenticatedUser().RequireRole("Admin"));
                options.AddPolicy("User", p => p.RequireAuthenticatedUser().RequireRole("User"));
            });
        }
 public MovieLocalDataSource(IMovieContext context)
 {
     _context = context;
 }
 public MovieDataSource(IMovieContext _context)
 {
     _localDataSource = new MovieLocalDataSource(_context);
     _sync            = new Sync();
 }
 public ActorRepository(IMovieContext context)
 {
     _context = context;
 }
Esempio n. 25
0
 public MovieUow(IMovieContext context, IRepositoryProvider repositoryProvider) : base(context, repositoryProvider)
 {
 }
Esempio n. 26
0
 public MovieRepository(IMovieContext context)
 {
     _context = context;
 }
Esempio n. 27
0
 public MovieLogic(IMovieContext context, IMapper mapper)
 {
     Repository = new MovieRepository(context);
     _mapper    = mapper;
 }
Esempio n. 28
0
 public TorrentRepository(IMovieContext context)
 {
     _context = context;
 }
Esempio n. 29
0
 public TransactionLogic(ITransactionContext context, IAiringMovieContext airingMovieContext, IMovieContext movieContext, IRoomContext roomContext, IApiHelper apiHelper)
 {
     _transactionRepo  = new TransactionRepo(context);
     _airingMovieLogic = new AiringMovieLogic(airingMovieContext, roomContext);
     _movieLogic       = new MovieLogic(movieContext, roomContext, apiHelper, airingMovieContext);
 }
Esempio n. 30
0
 public DbInitializer(IOptions <Settings> settings)
 {
     _movieContext = new MovieContext(settings);
 }
Esempio n. 31
0
 public MovieRepo(IMovieContext context)
 {
     this._context = context;
 }