public UnitOfWork(EducationManagementContext context, UserManager <User> userManager, SignInManager <User> signInManager , RoleManager <Role> roleManager) { _context = context; UserManager = userManager; SignInManager = signInManager; RoleManager = roleManager; }
public AccountController( UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, RoleManager <ApplicationRole> roleManager, EducationManagementContext context) { _userManager = userManager; _signInManager = signInManager; _roleManager = roleManager; _context = context; }
public SubjectsRepository(EducationManagementContext context) : base(context) { }
public LevelsRepository(EducationManagementContext context) : base(context) { }
public GradesController(EducationManagementContext context) { _context = context; }
private IHostingEnvironment _hostingEnvironment; // we will create the “xlsx” file in the wwwroot folder. To get wwwroot folder path, we need to inject IHostingEnvironment dependency in the constructor. public StudentsController(EducationManagementContext context, IHostingEnvironment hostingEnvironment) { _context = context; _hostingEnvironment = hostingEnvironment; }
public GenericRepository(EducationManagementContext context) { _context = context; _dbSet = context.Set <T>(); }