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(); }
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; }
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); }
public CreditsService(IMovieContext db) { _db = db; }
public FakeMovieRepository(IMovieContext context) { _context = context; }
public MovieLogic(IMovieContext context) { movieContext = context; }
public MovieLoaderLogic(IMovieContext dats) { _dats = dats; }
public VoteService(IMovieContext db) { _db = db; }
public ActorRepository(IMovieContext context) { _context = context; }
public SearchDataService(IMovieContext db, ILogger <SearchDataService> logger) { _db = db; _logger = logger; }
public FolderService(IMovieContext db) { _db = db; }
public MovieService(IMovieContext db) { this.db = db; }
public MovieRepo(IMovieContext context, IApiHelper apiHelper) { _movieContext = context; _apiHelper = apiHelper; }
public MovieListLogic(IMovieContext dats) { _dats = dats; }
public UserService(IMovieContext db, ILogger <UserService> logger) { _logger = logger; _db = db; }
public MovieComponents(IMovieContext movieContext) { this.movieContext = movieContext; }
public MovieService(IMovieContext db, IMapper mapper) { _mapper = mapper; _db = db; }
public PeopleService(IMovieContext db, IMapper mapper) { _db = db; _mapper = mapper; }
public GenreService(IMovieContext db) { _db = db; }
public MovieRepository(IMovieContext dbContext) { _dbContext = dbContext; }
// 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 MovieUow(IMovieContext context, IRepositoryProvider repositoryProvider) : base(context, repositoryProvider) { }
public MovieRepository(IMovieContext context) { _context = context; }
public MovieLogic(IMovieContext context, IMapper mapper) { Repository = new MovieRepository(context); _mapper = mapper; }
public TorrentRepository(IMovieContext context) { _context = context; }
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); }
public DbInitializer(IOptions <Settings> settings) { _movieContext = new MovieContext(settings); }
public MovieRepo(IMovieContext context) { this._context = context; }