Example #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app,
                              IHostingEnvironment env,
                              IApplicationLifetime applicationLifetime,
                              UserManager <User> userManager,
                              RoleManager <IdentityRole> roleManager,
                              IRouteAnalyzer routeAnalyzer,
                              MoviesPlaceContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseHsts();
            }

            app.UseMiddleware <JWTInHeaderMiddleware>();

            app.ConfigureExceptionHandler(_logger);

            app.UseHttpsRedirection();

            app.UseAuthentication();

            app.UseHttpsRedirection();

            app.SeedDatabase();

            app.UseMvc();

            applicationLifetime.ApplicationStarted.Register(() =>
            {
                var infos = routeAnalyzer.GetAllRouteInformations();
                Debug.WriteLine("======== ALL ROUTE INFORMATION ========");
                foreach (var info in infos)
                {
                    Debug.WriteLine(info.ToString());
                }
                Debug.WriteLine("");
                Debug.WriteLine("");
            });
        }
Example #2
0
 public RefreshTokenRepository(MoviesPlaceContext dbContext)
 {
     _dbContext = dbContext;
 }
 public FavoriteRepository(MoviesPlaceContext dbContext)
 {
     _dbContext = dbContext;
 }
 public UserRepository(MoviesPlaceContext dbContext)
 {
     _dbContext = dbContext;
 }
Example #5
0
 public PostRepository(MoviesPlaceContext dbContext)
 {
     _dbContext = dbContext;
 }
 public CommentRepository(MoviesPlaceContext dbContext)
 {
     _dbContext = dbContext;
 }