Ejemplo n.º 1
0
 public GlobalDashboardController(IEventRepository repo, IGCPTaskRepository taskRepo, RoleManager <IdentityRole> roleMgr, UserManager <ApplicationUser> userMrg, ApplicationDbContext ctx)
 {
     //this method is passing in all the data to the constructor and assigning it to a variable to be used to access model data
     //throughout the controller
     repository     = repo;
     taskRepository = taskRepo;
     roleManager    = roleMgr;
     userManager    = userMrg;
     context        = ctx;
 }
 //passing object repositories into the constructor
 public VolunteerDonorDashboardController(IVolunteerHourRepository hourRepo, IEventRegistrationRepository regRepo, IEventRepository eventRepo, IGCPTaskRepository taskRepo, UserManager <ApplicationUser> userMrg, ApplicationDbContext ctx)
 {
     repository             = hourRepo;
     registrationRepository = regRepo;
     eventRepository        = eventRepo;
     userManager            = userMrg;
     context = ctx;
 }