コード例 #1
0
 public static void ActivateTeacher(string email, string password, CoordinatingCompanyContext context)
 {
     Teachers = teachers ?? (teachers = GetTeachers(context));
     if (Teachers.Any(t => t.Email == email))
     {
         users.Add(email, HashPassword(password));
     }
     SaveChanges(users);
 }
コード例 #2
0
 public IndexModel(CoordinatingCompany.Data.CoordinatingCompanyContext context)
 {
     _context = context;
 }
コード例 #3
0
 private static List <Teacher> GetTeachers(CoordinatingCompanyContext context)
 => context.Teachers.Include(t => t.Department).ToList();
コード例 #4
0
 public DeleteModel(CoordinatingCompany.Data.CoordinatingCompanyContext context)
 {
     _context = context;
 }