Esempio n. 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, ILoggerFactory loggerFactory, ProfileContextDb context)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Main/Error");
            }

            app.UseStaticFiles();
            app.UseIdentity();

            /*app.UseFacebookAuthentication(new FacebookOptions()
             * {
             *  AppId = Configuration["Authentication:Facebook:Id"],
             *  AppSecret = Configuration["Authentication:Facebook:secretCode"]
             *
             *
             * });*/

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Main}/{action=Index}/{id?}");
            });

            Initializer.InitializeContext(context);
        }
 public UserDetailRepo(ProfileContextDb userRepo)
 {
     _userRepo = userRepo;
 }