public ExternalLoginModel( SignInManager <AccountUser> signInManager, UserManager <AccountUser> userManager, ILogger <ExternalLoginModel> logger, ASRContext context) { _signInManager = signInManager; _userManager = userManager; _logger = logger; _context = context; }
public static async Task InitialiseAsync(IServiceProvider serviceProvider) { using (var userManager = serviceProvider.GetRequiredService <UserManager <ApplicationUser> >()) using (var roleManager = serviceProvider.GetRequiredService <RoleManager <IdentityRole> >()) using (var context = new ASRContext(serviceProvider.GetRequiredService <DbContextOptions <ASRContext> >())) { await InitialiseRolesAsync(roleManager); await InitialiseRoomsAsync(context); await context.SaveChangesAsync(); } }
public RegisterModel( UserManager <AccountUser> userManager, SignInManager <AccountUser> signInManager, ILogger <RegisterModel> logger, IEmailSender emailSender, ASRContext context) { _userManager = userManager; _signInManager = signInManager; _logger = logger; _emailSender = emailSender; _context = context; }
private static async Task InitialiseRoomsAsync(ASRContext context) { if (await context.Room.AnyAsync()) { return; // return if rooms already exist } await context.Room.AddRangeAsync( new Room { RoomID = "A" }, new Room { RoomID = "B" }, new Room { RoomID = "C" }, new Room { RoomID = "D" } ); }
public RoomController(ASRContext context) { _context = context; }
public StudentController(ASRContext context, UserManager <ApplicationUser> userManager) { _context = context; _userManager = userManager; }
public SlotsController(ASRContext context) { _context = context; }
public StaffsController(ASRContext context) { _context = context; }
public AdminsController(ASRContext context) { _context = context; }
public StudentsController(ASRContext context) { _context = context; }
public StudentsController(ASRContext context) { baseUrl = "https://localhost:44317/ASRapi/"; SlotStudent = new StudentSlotViewModel(); }