//dependency injection through constructor, to directly access services public MembershipController( Services.Security.ICommon security, IOptions <IdentityDefaultOptions> identityDefaultOptions, IOptions <SuperAdminDefaultOptions> superAdminDefaultOptions, ApplicationDbContext context, UserManager <IdentityUser> userManager ) { _security = security; _identityDefaultOptions = identityDefaultOptions.Value; _superAdminDefaultOptions = superAdminDefaultOptions.Value; _context = context; _userManager = userManager; }
//dependency injection through constructor, to directly access services public RoleController(Services.Security.ICommon security) { _security = security; }