Exemple #1
0
        //private readonly ISession session;

        public AccountController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, ModularityProContext db, IMemoryCache memoryCache)
        {
            _userManager   = userManager;
            _signInManager = signInManager;
            _db            = db;
            _cache         = memoryCache;
        }
        public void Configure(IApplicationBuilder app, ModularityProContext context)
        {
            app.UseStaticFiles();

            app.UseDeveloperExceptionPage();

            app.UseAuthentication();

            app.UseSession();

            //context.Database.Migrate();

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

            app.UseSignalR(routes =>
            {
                routes.MapHub <ChatHub>("/chatHub");
            });
        }
Exemple #3
0
 public FriendsController(ModularityProContext db)
 {
     _db = db;
 }
 public HomeController(ModularityProContext db, UserManager <ApplicationUser> userManager)
 {
     //   UserStateViewModel = new UserStateViewModel();
     _db          = db;
     _userManager = userManager;
 }
Exemple #5
0
 public PostsController(ModularityProContext db)
 {
     _db = db;
 }
Exemple #6
0
 public ChatHub(ModularityProContext db)
 {
     _db             = db;
     UserConnections = new Dictionary <string, string>();
 }
Exemple #7
0
 public ProfileController(ModularityProContext db, UserManager <ApplicationUser> userManager)
 {
     _db          = db;
     _userManager = userManager;
 }