Example #1
0
 public RoleRepository(TWorkDbContext ctx)
 {
     _ctx = ctx;
 }
Example #2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, UserManager <USER> userManager, TWorkDbContext ctx)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseStatusCodePages();
                TWorkDbInitializer.SeedUser(userManager);
                TWorkDbInitializer.SeedData(ctx);
            }
            app.UseStaticFiles();

            app.UseStatusCodePages(async context => {
                if (context.HttpContext.Response.StatusCode == 403)
                {
                    context.HttpContext.Response.Redirect("Account/AccessDenied");
                }
            });

            app.UseAuthentication();
            app.UseSession();
            app.UseMvc(options =>
                       options.MapRoute("default", "{controller=Home}/{action=Index}/{id?}"));
        }
Example #3
0
 public TeamRepository(TWorkDbContext ctx)
 {
     _ctx = ctx;
 }
Example #4
0
 public CommentRepository(TWorkDbContext ctx)
 {
     _ctx = ctx;
 }
Example #5
0
 public UserRepository(TWorkDbContext context, UserManager <USER> userManager, SignInManager <USER> signInManager)
 {
     _ctx           = context;
     _userManager   = userManager;
     _signInManager = signInManager;
 }
Example #6
0
 public MessageRepository(TWorkDbContext ctx)
 {
     _ctx = ctx;
 }