コード例 #1
0
 public ExternalLoginModel(
     SignInManager <AccountUser> signInManager,
     UserManager <AccountUser> userManager,
     ILogger <ExternalLoginModel> logger,
     ASRContext context)
 {
     _signInManager = signInManager;
     _userManager   = userManager;
     _logger        = logger;
     _context       = context;
 }
コード例 #2
0
ファイル: SeedData.cs プロジェクト: aidengaripoli/asr
        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();
                    }
        }
コード例 #3
0
 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;
 }
コード例 #4
0
ファイル: SeedData.cs プロジェクト: aidengaripoli/asr
 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" }
         );
 }
コード例 #5
0
ファイル: RoomController.cs プロジェクト: aidengaripoli/asr
 public RoomController(ASRContext context)
 {
     _context = context;
 }
コード例 #6
0
 public StudentController(ASRContext context, UserManager <ApplicationUser> userManager)
 {
     _context     = context;
     _userManager = userManager;
 }
コード例 #7
0
 public SlotsController(ASRContext context)
 {
     _context = context;
 }
コード例 #8
0
 public StaffsController(ASRContext context)
 {
     _context = context;
 }
コード例 #9
0
 public AdminsController(ASRContext context)
 {
     _context = context;
 }
コード例 #10
0
 public StudentsController(ASRContext context)
 {
     _context = context;
 }
コード例 #11
0
 public StudentsController(ASRContext context)
 {
     baseUrl     = "https://localhost:44317/ASRapi/";
     SlotStudent = new StudentSlotViewModel();
 }