public IndexModel(HumanErrorProjectContext context, IOptions <ViewOptions> options) { Context = context; Assignments = context.Set <Assignment>(); Models = context.Set <MarkovModel>(); Options = options.Value; }
public RegisterModel(HumanErrorProjectContext context, SignInManager <IdentityUser> signInManager, UserManager <IdentityUser> userManager) { Context = context; SignInManager = signInManager; UserManager = userManager; Students = Context.Set <Student>(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, UserManager <IdentityUser> userManager, RoleManager <IdentityRole> roleManager, HumanErrorProjectContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); } else { app.UseExceptionHandler("/Error"); app.UseHsts(); } app.UseCookiePolicy(); app.UseAuthentication(); app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseCookiePolicy(); app.UseHangfireServer(); app.UseHangfireDashboard("/hangfire", new DashboardOptions()); app.UseHangfireDashboard(); app.UseMvc(); Seed(userManager, roleManager, context).Wait(); }
public StudentsModel(HumanErrorProjectContext context, IOptions <ViewOptions> options) { Context = context; CourseClasses = context.Set <CourseClass>(); Students = context.Set <Student>(); Options = options.Value; }
public DetailsModel(IEngineService engineService, HumanErrorProjectContext context) { EngineService = engineService; Context = context; PreAssignments = context.Set <PreAssignment>(); Assignments = context.Set <Assignment>(); }
public DetailsModel(HumanErrorProjectContext context, ColorHelper colorHelper) { Context = context; MarkovModels = context.Set <MarkovModel>(); Snapshots = context.Set <Snapshot>(); ColorHelper = colorHelper; }
public StateModel(HumanErrorProjectContext context, ColorHelper colorHelper) { Context = context; MarkovModels = context.Set <MarkovModel>(); Snapshots = context.Set <Snapshot>(); SurveyQuestions = context.Set <SurveyQuestion>(); ColorHelper = colorHelper; }
public async Task Seed(UserManager <IdentityUser> userManager, RoleManager <IdentityRole> roleManager, HumanErrorProjectContext context) { if (await roleManager.FindByNameAsync(IdentityRoleConstants.Admin) == null) { await roleManager.CreateAsync(new IdentityRole(IdentityRoleConstants.Admin)); } if (await roleManager.FindByNameAsync(IdentityRoleConstants.Student) == null) { await roleManager.CreateAsync(new IdentityRole(IdentityRoleConstants.Student)); } var cobe = "*****@*****.**"; if (await userManager.FindByNameAsync(cobe) == null) { var user = new IdentityUser() { UserName = cobe, Email = cobe, }; var result = await userManager.CreateAsync(user, "Human3rr0rPr0j3ct"); if (result.Succeeded) { await userManager.AddClaimAsync(user, new Claim(ClaimTypes.Role, IdentityRoleConstants.Admin)); await userManager.AddToRoleAsync(user, IdentityRoleConstants.Admin); } } var lucas = "*****@*****.**"; if (await userManager.FindByNameAsync(lucas) == null) { var user = new IdentityUser() { UserName = lucas, Email = lucas }; var result = await userManager.CreateAsync(user, "Human3rr0rPr0j3ct"); if (result.Succeeded) { await userManager.AddClaimAsync(user, new Claim(ClaimTypes.Role, IdentityRoleConstants.Admin)); await userManager.AddToRoleAsync(user, IdentityRoleConstants.Admin); } } }
public StudentRepository(HumanErrorProjectContext context) : base(context) { }
public CreateModel(HumanErrorProjectContext context, IEngineService engineService) { Context = context; Assignments = context.Set <Assignment>(); EngineService = engineService; }
public DetailsModel(HumanErrorProjectContext context) { Context = context; Snapshots = context.Set <Snapshot>(); }
public DeleteModel(HumanErrorProjectContext context) { Context = context; SurveyQuestions = context.Set <SurveyQuestion>(); }
public MethodDeclarationsModel(HumanErrorProjectContext context) { Context = context; Assignments = context.Set <Assignment>(); }
public CreateModel(HumanErrorProjectContext context, IEngineService engineService) { Context = context; CourseClasses = context.Set <CourseClass>(); EngineService = engineService; }
public AssignmentRepository(HumanErrorProjectContext context) : base(context) { }
public AbstractSyntaxTreesModel(HumanErrorProjectContext context) { Context = context; Assignments = context.Set <Assignment>(); }
public IndexModel(HumanErrorProjectContext context, IOptions <ViewOptions> options) { CourseClasses = context.Set <CourseClass>(); Options = options.Value; }
public DeleteModel(DeleteHelper deleteHelper, HumanErrorProjectContext context) { DeleteHelper = deleteHelper; Context = context; PreAssignments = context.Set <PreAssignment>(); }
public ProgressModel(HumanErrorProjectContext context) { Context = context; Students = context.Set <Student>(); Assignments = context.Set <Assignment>(); }
public SurveysModel(HumanErrorProjectContext context) { Context = context; Assignments = context.Set <Assignment>(); SurveyQuestions = context.Set <SurveyQuestion>(); }
public IndexModel(HumanErrorProjectContext context, IOptions <ViewOptions> options) { Context = context; Students = context.Set <Student>(); Options = options.Value; }
public DeleteModel(HumanErrorProjectContext context, DeleteHelper deleteHelper) { Context = context; DeleteHelper = deleteHelper; MarkovModels = context.Set <MarkovModel>(); }
public DeleteModel(HumanErrorProjectContext context) { Context = context; CourseClasses = context.Set <CourseClass>(); }
public IndexModel(HumanErrorProjectContext context, IOptions <ViewOptions> options, IEmailService emailService) { Students = context.Set <Student>(); Options = options.Value; EmailService = emailService; }
public IndexModel(HumanErrorProjectContext context) { Context = context; Assignments = context.Set <Assignment>(); }
public TestResultsModel(HumanErrorProjectContext context) { Context = context; Assignments = context.Set <Assignment>(); }
public SubmitModel(HumanErrorProjectContext context) { Context = context; SurveyQuestionsSet = context.Set <SurveyQuestion>(); Surveys = context.Set <Survey>(); }
public ReviewModel(HumanErrorProjectContext context) { Context = context; Surveys = context.Set <Survey>(); }
public BagOfWordsModel(HumanErrorProjectContext context) { Context = context; Assignments = context.Set <Assignment>(); }
public EditModel(HumanErrorProjectContext context) { Context = context; Students = context.Set <Student>(); }